-
Notifications
You must be signed in to change notification settings - Fork 173
Description
Description
In case of a payload parse error, we get the message Invalid input! Failed to parse contents of the provided payload.
which is not very specific. It would be great to have a better message that highlight which line is the source of the error.
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- example code related
- testing related
- discussion
Requirements (place an x
in each of the [ ]
)
- I've read and understood the Contributing guidelines and have done my best effort to follow them.
- I've read and agree to the Code of Conduct.
- I've searched for any related issues and avoided creating a duplicate issue.
Bug Report
When the payload is malformed, it result in a parse error message which does not guide us on where to look for to find the problem. It would be great if we could at least have the line where the first error happen.
Reproducible in:
package version: latest
node version:
OS version(s):
Steps to reproduce:
- Send a malformed payload
- Figure out why it is malformed
Expected result:
Display the line of the first error found. I understand there is a difficulty with the optimistic detection of the file format (yaml vs json), but it is likely that a yaml file parse with less error when there is a malformed payload with the yaml parser than with the json parser.
Actual result:
Just say: Invalid input! Failed to parse contents of the provided payload.