-
Notifications
You must be signed in to change notification settings - Fork 45
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
.ajax processing 2xx responses with no data as an error #3
Comments
According to this line https://github.com/nolimits4web/Dom7/blob/master/src/ajax.js#L210 all 2xx responses are treated as success, maybe error somewhere else? |
It's definitely a 204 and getting handled by the error callback. I am logging the xhr object to the console from there and status is 204. |
I just had this problem again, and this time with a 200 response! Lol, so I was wrong that it was due to the response code, as you pointed out. What it does seem to be to do with is when there is no data in the response. I added data to my response and that fixed it, and of course a 204 has no data. A 2xx response with no data is handled as an error. Perhaps only when |
Closing as not relevant anymore |
The
.ajax
feature is handling a 204 response as an error, when it should be handled by success. As should any 2xx code.The text was updated successfully, but these errors were encountered: