From 182fe4a90f99fbcc664f2243b5d7f3636e8cd94b Mon Sep 17 00:00:00 2001 From: Neil Orley Date: Fri, 10 Nov 2017 15:48:43 +0100 Subject: [PATCH] Change HTTP response code when nothing modified --- htdocs/commande/class/api_orders.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 298333e1fb8..60f1be1e00c 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -490,7 +490,7 @@ class Orders extends DolibarrApi throw new RestException(500, 'Error nothing done. May be object is already validated'); } if ($result < 0) { - throw new RestException(500, 'Error when validating Order: '.$this->commande->error); + throw new RestException(304, 'Error when validating Order: '.$this->commande->error); } $result = $this->commande->fetch($id); if( ! $result ) {