Use HTTP response code 304 instead of 500 when nothing is done

This commit is contained in:
Laurent Destailleur
2017-11-14 01:26:02 +01:00
parent 765a2097bc
commit a12186a0b8
7 changed files with 9 additions and 9 deletions

View File

@@ -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);