Closed francois-spectre closed 2 years ago
@achrinza I could fix it but which behaviour would you like? We could return a 400 "Bad request" or use a default Content-Type value for instance...
@francois-spectre, what about 415
? https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415.
Would you be interested to submit a PR?
@dhmlau I have implemented the 415 error ^
The issue
If I do a curl to the strong-api route without headers neither body an issue is thrown and is not caught anywhere
Invalid value "undefined" for header "Content-Type"
I would expect the server to return a 400 "Bad request", or ignore it, or run a default "controller", or anything but not crashing the server. What can I do to solve this issue?
Error detail
It happens here in the code: https://github.com/loopbackio/strong-soap/blob/86c86a109b4fe8af85d4f67b195a3c877e351e51/src/server.js#L84