mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-25 10:13:22 +01:00
api fixes
According to [RFC2616](https://www.rfc-editor.org/rfc/rfc2616#section-10.2), APIs should return 2xx status codes if the request was correct. The response should be status 200 with an empty result array.
This commit is contained in:
@@ -259,9 +259,7 @@ class Orders extends DolibarrApi
|
||||
} else {
|
||||
throw new RestException(503, 'Error when retrieve commande list : '.$this->db->lasterror());
|
||||
}
|
||||
if (!count($obj_ret)) {
|
||||
throw new RestException(404, 'No order found');
|
||||
}
|
||||
|
||||
return $obj_ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user