Add return for error while uploding image
This commit is contained in:
1
api.go
1
api.go
@@ -241,6 +241,7 @@ func uploadPhotoBinaries(images []imageWithMeta, metaResp models.ImageMetaRespon
|
|||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode >= 400 {
|
if resp.StatusCode >= 400 {
|
||||||
|
return fmt.Errorf("failed to upload photo %s: status %d", title, resp.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user