mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Handle errors message formatting
This commit is contained in:
@@ -14,4 +14,8 @@ angular.module("ofn.admin").factory "ProductImageService", (FileUploader, SpreeA
|
||||
product.thumb_url = response.thumb_url
|
||||
product.image_url = response.image_url
|
||||
@imageUploader.onErrorItem = (image, response) =>
|
||||
alert(response.errors.join("\n"))
|
||||
if Array.isArray(response.errors)
|
||||
message = response.errors.join("\n")
|
||||
else
|
||||
message = response.error.toString()
|
||||
alert(message)
|
||||
|
||||
Reference in New Issue
Block a user