node-restify
node-restify copied to clipboard
feat: adds support to http problem details - rfc7807
Pre-Submission Checklist
- [ ] Opened an issue discussing these changes before opening the PR
- [x] Ran the linter and tests via
make prepush
- [x] Included comprehensive and convincing tests for changes
Changes
What does this PR do?
adds supports to handle error objects conforming with the http problem details spec (rfc7807).
The spec defines a status
field (instead of statusCode
) and a
application/problem+json
content type. Code will prefer the current
behavior of sending application/json
if statusCode
is present.