[EPIC] fix: error handling in REST API endpoints
petermetz opened this issue · 0 comments
petermetz commented
Description
4xx and 5xx status codes should be used correctly throughout the codebase.
Right now there are instances where an exception thrown is hardcoded to lead to an HTTP 400 regardless of what the exception was.
We need to untangle on a case by case basis the issue above because in some cases the plugins throw exceptions that are user error related.
There should be documentation about error handling and with a decision tree where contributors can ask themselves a series of questions to determine what is the appropriate way of handling an error.
Acceptance Criteria
- User error vs. internal server error is always clearly distinguished vs. it being basically random (which right now it is in some endpoints)
- Collect a list of sub-issues (which are for the implementation work) into this epic