We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99e236e commit 118f104Copy full SHA for 118f104
src/nssentry.android.ts
@@ -368,9 +368,12 @@ export namespace NSSentry {
368
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
369
options.beforeSend(event as any, hint);
370
}
371
- const map = new java.util.HashMap();
372
- map.put('X-Forwarded-Protocol', 'https');
373
- event.getRequest().setHeaders(map);
+
+ if (event.getRequest()) {
+ const map = new java.util.HashMap();
374
+ map.put('X-Forwarded-Protocol', 'https');
375
+ event.getRequest().setHeaders(map);
376
+ }
377
// we use this callback to actually try and get the JS stack when a native error is catched
378
try {
379
const ex: io.sentry.core.protocol.SentryException = event.getExceptions().get(0);
0 commit comments