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 Oct 11, 2022. It is now read-only.
I have issues similar to #82 . I am using the error middleware JsonRoutes.ErrorMiddleware.use(RestMiddleware.handleErrorAsJson) but if the JSON in the request body is not valid such as containing unescaped newline chars, I get response with code 500 and not so good looking text on the lines of "Meteor code must always run within a Fiber". I believe this is reproducible with any post request with invalid JSON body. The error message points to body-parser as seen below:
SyntaxError: Unexpected token
at Object.parse (native)
\.meteor\packages\simple_json-routes\2.1.0\npm\node_modules\connect\node_modules
\body-parser\lib\types\json.js:88:17
Please can this be handled in a better way?
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have issues similar to #82 . I am using the error middleware JsonRoutes.ErrorMiddleware.use(RestMiddleware.handleErrorAsJson) but if the JSON in the request body is not valid such as containing unescaped newline chars, I get response with code 500 and not so good looking text on the lines of "Meteor code must always run within a Fiber". I believe this is reproducible with any post request with invalid JSON body. The error message points to body-parser as seen below:
Please can this be handled in a better way?
Thanks
The text was updated successfully, but these errors were encountered: