Skip to content
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

unhandledrejection not part of IInstrumentationOptions #1383

Open
DawidJanczak opened this issue Feb 23, 2025 · 3 comments
Open

unhandledrejection not part of IInstrumentationOptions #1383

DawidJanczak opened this issue Feb 23, 2025 · 3 comments
Labels

Comments

@DawidJanczak
Copy link

🐞 bug report

Affected Package

The issue is caused by package @airbrake/browser

Is this a regression?

No

Description

After installing airbrake/browser the @airbrake/browser/dist/options.d.ts file's IInstrumentationOptions do not include unhandledrejection introduced in #915

@thompiler
Copy link
Member

Hi @DawidJanczak 👋

Are you saying that this option is not respected when set?
https://github.com/airbrake/airbrake-js/tree/master/packages/browser#unhandledrejection

Can you share an example of your Airbrake config?

@DawidJanczak
Copy link
Author

Hello!

No, it's not about the option working or not but rather the TypeScript types being incorrect - if I set it TS complains with Object literal may only specify known properties, and 'unhandledrejection' does not exist in type 'IInstrumentationOptions'. If I set other options (e.g. fetch) under the instrumentation key it works OK, it's just this particular option that doesn't work. And indeed if I then cd to @airbrake/browser/dist/options.d.ts I see

export interface IInstrumentationOptions {
    onerror?: boolean;
    fetch?: boolean;
    history?: boolean;
    console?: boolean;
    xhr?: boolean;
}

@thompiler
Copy link
Member

Thank you for reporting this. We'll take a look at this issue so we can replicate the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants