2
0
forked from Wavyzz/dolibarr

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:
Fabian Heinz
2023-12-31 14:11:05 +01:00
committed by GitHub
parent aa43e18d56
commit b78632a20e
25 changed files with 20 additions and 103 deletions

View File

@@ -1156,10 +1156,6 @@ class Setup extends DolibarrApi
throw new RestException(503, 'Error when retrieving list of extra fields : '.$this->db->lasterror());
}
if (!count($list)) {
throw new RestException(404, 'No extrafield found');
}
return $list;
}