update error handlers

This commit is contained in:
Hayden 2022-08-30 16:40:27 -08:00
parent 93a4a816f9
commit 9501eb398a
4 changed files with 25 additions and 16 deletions

View file

@ -52,7 +52,7 @@ func Test_RespondError(t *testing.T) {
func Test_RespondInternalServerError(t *testing.T) {
recorder := httptest.NewRecorder()
RespondInternalServerError(recorder)
RespondServerError(recorder)
assert.Equal(t, http.StatusInternalServerError, recorder.Code)
assert.JSONEq(t, recorder.Body.String(), `{"details":["internal server error"], "message":"Internal Server Error", "error":true}`)