-
Notifications
You must be signed in to change notification settings - Fork 39
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
Handling HTTP code 204 #13
Comments
Hi, do you use Spring Data REST? If not I think I cannot give you support for that as this library is for Spring Data REST and the other usages are not supported and I think it is not a proper REST API if it returns a You are able to implement your own Then you can handle the Thanks and regards, Guy |
Yes we use Spring Data REST. If i implement my own |
@guylabs if (responseData.status == 204) {
return $injector.get("$q").when(data).then(function() {
data[key] = null;
});
} and add it in https://github.com/guylabs/angular-spring-data-rest/blob/master/src/angular-spring-data-rest-provider.js#L93 What do you think ? |
Well in my opinion it is not a good idea to add this to the core as a And this is not Angular which logs them, but the browser itself, and therefore I wouldn't change the semantics of REST just to avoid these kind of logs. The normal users will never see these logs anyway. Here some links how to solve it in Chrome: https://stackoverflow.com/questions/24207143/angular-avoid-console-trace-on-http-error So therefore I would close this issue if it is ok with you. Thanks and regards, Guy |
I see.. i'm ok with that.. SpringDataRestAdapter.process(response, ['link', 'link2', 'link3']).then(function(result) {
....
}); if |
Well as you see it here: https://github.com/guylabs/angular-spring-data-rest/blob/master/src/angular-spring-data-rest-provider.js#L105 If one of those return a Thanks for using the component! :) Regards, Guy |
👍 Thanks Guy |
Thanks for the praise :). Regards, Guy |
Hi @guylabs
Somehow API will return
204
rather than404
for unknown links.How can i handle this
204
code ? Now when i get204
all of request will be break and nothing happened.Thanks
The text was updated successfully, but these errors were encountered: