You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.
When I verify my codes, the third test always fails :
3. ACTUAL: "responds "Internal Server Error" when requesting /error"
3. EXPECTED: "responds "internal server error" when requesting /error"
The text was updated successfully, but these errors were encountered:
Two things of note, possibly spoilers (click to expand)
About the solution criteria
It seems a passing solution only needs a matching response body, not the response status.
I guess the author intended a response 200 with different message bodies,
while some readers (including myself) think the status code has to match the route.
(So that /500 returns HTTP 500 etc.)
About setting the response body with HTTP status >= 500
As per the http-errors docs,
it seems one needs to set err.expose = true in order to set a custom response body.
That certainly doesn't seem like the author's intention, but is one way to solve the problem.
To summarize I think elaborating the solution criteria might be a good idea.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the task of error handler, the response cannot be set with
ctx.body = 'internal server error'
. Here is my error handler :When I verify my codes, the third test always fails :
3. ACTUAL: "responds "Internal Server Error" when requesting
/error
"3. EXPECTED: "responds "internal server error" when requesting
/error
"The text was updated successfully, but these errors were encountered: