-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest-adapter errorHandler set content-type json
#390
Conversation
@@ -210,6 +210,24 @@ describe('strong-remoting-rest', function() { | |||
.end(done); | |||
}); | |||
|
|||
it('should use `content-type: application/json` for default errorHandler', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a comment before this test case with a link to the github issue this test is reproducing?
|
||
request(app).get(method.url) | ||
.expect(500) | ||
.expect('content-type', 'application/json; charset=utf-8', function(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this line:
.expect('content-type', '...', done);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nitpicks, the change LGTM otherwise. No further reviews are needed.
the defaultHandler always res.sends an object therefore make sense to always set response header as such
5ff91d9
to
e844ae6
Compare
@slnode test please |
the defaultHandler always res.sends an object
therefore make sense to always set response header as such
related to strongloop/loopback-component-storage#179