-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: add window / document checks, refactor XMLHttpRequest to Fetch #958
feat: add window / document checks, refactor XMLHttpRequest to Fetch #958
Conversation
00149df
to
b397581
Compare
2f29217
to
9dac42a
Compare
Hey @KonnorRogers, I started going through the PR (I know it's not ready, just wanted to have an idea) but it's difficulty to follow with all the formatting changes. Can you please remove the changed semi-colons and we can decide on a convention at a different PR? |
@subzero10 Was already looking at fixing the diff to be easier to follow 🙈 |
Awesome, thanks! I will come back to this later then 😄 |
@subzero10 should be much easier to parse now. |
c06b7fc
to
5a261a8
Compare
ce1bcfc
to
7be35e2
Compare
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.
Great work!
Did you get a chance to also test manually? What did you test with (i.e. browser, nodejs, chrome extension, web worker)?
I think it's necessary here because our integration tests mock the http call, which is something that we are changing with the PR.
I did get a chance to test manually in the following environments:
I basically tested that I did not test NodeJS since I didnt touch anything in core or in server. |
Sounds great! Yeah I don't see a reason to manually test server-side. We are good to go then! |
@KonnorRogers Btw, I think this is more of a feature rather than a fix. What do you think? |
Id agree with feature here. |
Fun reminder of how annoying this problem is with detecting where a library is being called from: |
80c197f
to
aa2ca1d
Compare
Refactor `XMLHttpRequest` in `send` to use `fetch` update transport tests fix test suite fix linting issues fix linting issues downgrade jest version number package downgrade fix test suite cleanup comment fix package version linting add comments on Cloudflare workers add comments on Cloudflare workers fix references to document ts-standard for easier diff remove async option working on diffs working on diffs working on diffs working on diffs working on diffs remove async one more time tests: add worker tests tests: add worker tests tests: add worker tests use jasmine use jasmine remove jasmine from worker remove jasmine from worker one last try circumvent fetch add some suggestions
aa2ca1d
to
1941244
Compare
Given the switch to using |
Actually, there is a page in our docs, but it's outdated (it says that IE 11 is supported). Thank you for pointing it out! |
Status
** Ready **
Description
Reduce our calls to windows object, use fetch instead of XMLHTTPRequest, and other niceties to allow Chrome Extensions and WebWorkers to use Honeybadger.
Related Issues
#686
#956
Todos
Additional notes
In some light testing of cloudflare workers I discovered the following:\
onunhandledpromiserejection
doesn't actually work.Example:
The above will just straight up error and it doesnt get caught by honeybadger.
There are some docs on handling errors in CF workers, but they feel rather manual and I havent seen anything about catching global errors.
https://developers.cloudflare.com/workers/learning/logging-workers/
Happy to do some more digging, but you can at least call Honeybadger.notify() from a CF worker and it wont error.