Update api_products.class.php

This commit is contained in:
Frédéric FRANCE 2018-04-23 15:31:55 +02:00 committed by GitHub
parent 315d5bad39
commit 657fa48c3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,7 @@ class Products extends DolibarrApi
} }
if ($result < 0) { if ($result < 0) {
throw new RestException(503, 'Error when retrieve category list : '.$categories->error); throw new RestException(503, 'Error when retrieve category list : '.array_merge(array($categories->error), $categories->errors));
} }
return $result; return $result;
@ -323,7 +323,7 @@ class Products extends DolibarrApi
} }
if ($result < 0) { if ($result < 0) {
throw new RestException(503, 'Error when retrieve prices list : '.$categories->error); throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors));
} }
return array( return array(
@ -365,7 +365,7 @@ class Products extends DolibarrApi
} }
if ($result < 0) { if ($result < 0) {
throw new RestException(503, 'Error when retrieve prices list : '.$categories->error); throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors));
} }
throw new RestException(501, 'Feature not yet available'); throw new RestException(501, 'Feature not yet available');
@ -400,7 +400,7 @@ class Products extends DolibarrApi
} }
if ($result < 0) { if ($result < 0) {
throw new RestException(503, 'Error when retrieve prices list : '.$categories->error); throw new RestException(503, 'Error when retrieve prices list : '.array_merge(array($this->product->error), $this->product->errors));
} }
return array( return array(