Refactoring API response errors
Goal
To add more details, hints for errors and specify INTERNAL_ERROR
(it should be used only for unpredicted errors).
For example, in GUI:
Something went wrong. clone with such ID already exists
Full response:
{"error": {},
"content": {"code": "INTERNAL_ERROR", "hint": "", "detail": "clone with such ID already exists", "message": "Internal server error."},
"message": "Internal Server Error",
"status_code": 500}
TODO / How to implement
- check the relevance of API responses, adjust if needed
- prepare list of code errors for the docs.
Acceptance criteria
Edited by Anatoly Stansler