fix(browser): update Request checks to be valid in Deno#5630
fix(browser): update Request checks to be valid in Deno#5630AbhiPrasad merged 1 commit intogetsentry:masterfrom
Conversation
|
Hey @GJZwiers, thanks for the contribution! How are you using Sentry with deno? |
Hello! Recently I tried to port the browser package to Deno, which works well enough for sending events to Sentry (but it's difficult to maintain for me). A lot of Deno users also use CDNs to import code, for example there is another Sentry port in the making. But in the next release of Deno there will be more support for importing import * as Sentry from 'npm:@sentry/browser';I believe most of the browser APIs used in sentry are now also supported in Deno, so I think it should be possible, maybe with a few small tweaks, to use Sentry in Deno this way. |
AbhiPrasad
left a comment
There was a problem hiding this comment.
Awesome, this sounds reasonable to me, cc @timfish
|
I've just had a chance to try out the Deno support for npm packages. It looks like npm packages support currently requires the Whereas
There are also some other key features which I suspect will always need to be specifically coded for Deno:
|
In Deno
@sentry/browseris almost usable, but the checknew Request('')fails silently because Deno throws aTypeError: invalid URLthat goes to a catch block. This changes the Request call to include a valid URLhttp://www.example.comso that@sentry/browsercan be imported in Deno without this issue.