Skip to content

Commit ae2839b

Browse files
committed
MOBILE-1701 ws: Improve error treatment in upload file
1 parent 75ec5d7 commit ae2839b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

www/core/lib/ws.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ angular.module('mm.core')
319319

320320
if (typeof data.exception !== 'undefined') {
321321
return $q.reject(data.message);
322+
} else if (data && typeof data.error !== 'undefined') {
323+
return $q.reject(data.error);
322324
} else if (data[0] && typeof data[0].error !== 'undefined') {
323325
return $q.reject(data[0].error);
324326
}

0 commit comments

Comments
 (0)