`/apikey` endpoint returns a 400 when it should return a 422
aaron-junot opened this issue · 1 comments
aaron-junot commented
When you send a request to the Create Resource endpoint that doesn't include a JSON body, you get a 422 response with a helpful error message informing you that a json body is required to use this endpoint. See
Lines 157 to 160 in aa3e33d
When you make a request to the /apikey
endpoint without a JSON body, you get a cryptic error message and a 400 response. We should catch this error and return a similar response that you'd get from the Create Resource endpoint.
While we're in there, we should verify that the intended error message is returned when the request body is blank or an empty object ({}
) on all endpoints that require a JSON body in the request.
aaron-junot commented
Closed in #185