[ZBX-9340] api error response is missing "data" property in case of database down Created: 2015 Feb 24 Updated: 2017 May 30 Resolved: 2015 Oct 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 2.2.8, 2.4.4 |
Fix Version/s: | 2.2.11rc1, 2.4.7rc1, 3.0.0alpha3 |
Type: | Incident report | Priority: | Minor |
Reporter: | Gabriele Armao | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | errorreporting | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
When Zabbix database is down, any api request correctly fails with a json error message (before 2.2, the error was not json, but just HTML, it was fixed in 2.2.x). {"jsonrpc":"2.0","error":{"code":1,"message":"Error connecting to database [No such file or directory]"},"id":0} while the API documentation ( https://www.zabbix.com/documentation/2.4/manual/api) states that: "If an error occurred, instead of the result property, the response object will contain an error property with the following data:
so either the documentation needs to be updated or the error in this case, should also contain a "data" property. |
Comments |
Comment by Gabriele Armao [ 2015 Apr 01 ] |
thanks for prettifying my ticket |
Comment by Sergey Sorokin [ 2015 Apr 02 ] |
Hi, Gabriele! |
Comment by Sergey Sorokin [ 2015 Apr 02 ] |
Hi again, Gabriele! The issue will be corrected on API side in 2-3 weeks. Have a Happy Easter! |
Comment by Gabriele Armao [ 2015 Apr 02 ] |
thanks Sergey for the update! |
Comment by Gunars Pujats (Inactive) [ 2015 Sep 08 ] |
(1) No translation strings changed. iivs CLOSED. |
Comment by Gunars Pujats (Inactive) [ 2015 Sep 08 ] |
RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-9340 |
Comment by Ivo Kurzemnieks [ 2015 Oct 02 ] |
(2) Now the message is duplicated in "data". Not sure if that's a good thing. Maybe we should display "message" like "Error connecting to database" and "data" could contain details returned by the database. Forexample "Unknown database 'test123'". It, however, would require a bit more serious changes. Should be discussed. iivs Discussed with sasha and decided to not duplicate the message in data and leave it empty. The documentation should be updated mentioning the case when it is empty. gunarspujats RESOLVED in r55953. iivs CLOSED. |
Comment by Gabriele Armao [ 2015 Oct 05 ] |
fair enough. |
Comment by Ivo Kurzemnieks [ 2015 Oct 06 ] |
TESTED. |
Comment by Gunars Pujats (Inactive) [ 2015 Oct 09 ] |
Fixed in:
|
Comment by Gunars Pujats (Inactive) [ 2015 Oct 09 ] |
(3) API documentation: iivs CLOSED. |