source-academy / stories-backend

Backend of Source Academy extension for Stories support.
0 stars 0 forks source link

Use API error handler for stories #60

Closed RichDom2185 closed 1 year ago

RichDom2185 commented 1 year ago

Uses the error handling framework introduced in #50 for the stories MVC. Similar to #59.

Also adds a 422 Unprocessable Entity client error type. Note that this is inconsistent behaviour with #59 as that returns a 400 on bad JSON unmarshall. This is wrong and will be refactored once both PRs are merged. Ideally,

The validate method that was missed for users and will be added once #58 is merged also needs to be refactored to use the correct status code.

github-actions[bot] commented 1 year ago

Coverage Status

coverage: 80.676% (-2.3%) from 83.0% when pulling 6637bbbba2099772f2261a2c2dacea818d1e445c on error-handling-stories into 07b900b3df0bb3e663ffdf06b8e62d5d786e4a44 on main.