New error handling added to server and decorator module in data package

This commit is contained in:
Héctor Hurtado
2019-11-18 14:52:52 +01:00
parent edff842c3b
commit e4b3a4f718
4 changed files with 37 additions and 8 deletions
+2 -3
View File
@@ -127,9 +127,8 @@ func TestCheckHandlerReturnsAFunctionsThat404sWhenHandlerDoesNotExist(t *testing
fn(w, r)
res := w.Result()
if res.StatusCode != http.StatusNotFound {
t.Errorf("Status code mismatch. Expected 404. Got %d", res.StatusCode)
for _, e := range checkErrorResponse(w.Result(), http.StatusNotFound, "Handler ID Not Found") {
t.Error(e.Error())
}
}