Skip to content

Restore res.json to original value in case of error. - #49

Open
whirr wants to merge 1 commit into
evanshortiss:masterfrom
whirr:fix-response-json-handler
Open

Restore res.json to original value in case of error.#49
whirr wants to merge 1 commit into
evanshortiss:masterfrom
whirr:fix-response-json-handler

Conversation

@whirr

@whirr whirr commented Aug 26, 2025

Copy link
Copy Markdown

The res.json is not restored to the previous value so when used in the error handler to return a JSON error it fails the validation again and use the default error handler to return a text/html error page.

@evanshortiss

Copy link
Copy Markdown
Owner

Great find @whirr. Could you add a test?

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same
when pulling e03dbff on whirr:fix-response-json-handler
into 7354dc1 on evanshortiss:master.

@evanshortiss

Copy link
Copy Markdown
Owner

Bump @whirr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants