Skip to content

Commit

Permalink
extend undefined parser reporting
Browse files Browse the repository at this point in the history
The purpose is to help in troubleshooting the issue, and suggest that the problem is most probably related to one of the three parameters.
  • Loading branch information
shimaore committed May 2, 2024
1 parent e8e01bd commit a7a92a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const parsers = {
const parser = find(parsers._parsers, [contentType, req.routeOptions.method, req.routeOptions.url]) ||
find(parsers._parsers, ['*', req.routeOptions.method, req.routeOptions.url])
if (!parser) {
throw new Error('undefined parser')
throw new Error(`undefined parser for ${contentType} ${req.routeOptions.method} ${req.routeOptions.url}`)
}
return await parser(req, payload)
},
Expand Down

0 comments on commit a7a92a4

Please sign in to comment.