Skip to content

Docs: automatically catching all AJAX errors in jQuery #204

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

Merged
merged 1 commit into from
Jul 25, 2015
Merged

Docs: automatically catching all AJAX errors in jQuery #204

merged 1 commit into from
Jul 25, 2015

Conversation

pkuczynski
Copy link
Contributor

No description provided.

@mattrobenolt
Copy link
Contributor

Shouldn't this be something we could patch automatically?

@mattrobenolt
Copy link
Contributor

I actually wanted to do something like this but by patching the native XHR object.

@pkuczynski
Copy link
Contributor Author

I was thinking about it for a while, as I originally wanted to extend plugins/jquery.js and add this pattern there. However I am not entirely sure if people would sometimes not treat an ajaxError (like 404 or 403) as one of the expected and valid responses and react to it accordingly. Then we would unnecessary attempt to record an error. In the other hand users could whitelist URLs to avoid this or we could provide an extra option to enable/disable global Ajax error handling

What do you think? I could submit a patch once you agree on the right solution...

@pkuczynski
Copy link
Contributor Author

@mattrobenolt so what do you think?

@mitsuhiko mitsuhiko merged commit 10a0348 into getsentry:master Jul 25, 2015
mitsuhiko added a commit that referenced this pull request Jul 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants