From da1d4d80f2c4eaac699026ebfff69905c18a2f48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Dec 2016 02:09:26 +0100 Subject: [PATCH] Fix return code REST similar for all api with POST --- htdocs/societe/class/api_thirdparties.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index d8430fedb76..cedd30c5209 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -193,7 +193,7 @@ class Thirdparties extends DolibarrApi $this->company->$field = $value; } if ($this->company->create(DolibarrApiAccess::$user) < 0) - throw new RestException(503, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors)); + throw new RestException(500, 'Error creating thirdparty', array_merge(array($this->company->error), $this->company->errors)); return $this->company->id; }