mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Use HTTP response code 304 instead of 500 when nothing is done
This commit is contained in:
@@ -537,7 +537,7 @@ class Orders extends DolibarrApi
|
||||
|
||||
$result = $this->commande->cloture(DolibarrApiAccess::$user, $notrigger);
|
||||
if ($result == 0) {
|
||||
throw new RestException(500, 'Error nothing done. May be object is already closed');
|
||||
throw new RestException(304, 'Error nothing done. May be object is already closed');
|
||||
}
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error when closing Order: '.$this->commande->error);
|
||||
|
||||
Reference in New Issue
Block a user