Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend: specify 4xx status codes for ApiError exceptions
Fix fedora-copr#3071 For some reason flask-restx internally logs 500 exceptions. Consider the following: - Route for adding package uses flask-restx, the ApiError (by default 500 error code) logs exception - The `/packages/list/` route doesn't use flask-restx, and the ApiError doesn't log exception - The route for getting a single package uses flask-restx, and its ObjectNotFound (404 status code) doesn't log exception. Which makes me think that flask-restx does this only for 5xx status codes (or possibly only 500) and I didn't find any such thing in our code so I think it does it internally. In this case, using 4xx status codes makes more sense anyway, so I am switching to them.
- Loading branch information