New error handling added to server and decorator module in data package
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user