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

ADD allow js client to add filters #689

Merged
merged 1 commit into from Apr 25, 2014
Merged

Conversation

oelmekki
Copy link
Contributor

A new Airbrake.addFilter( callback ) method has been added.

Before sending any error, notifier.js will try each provided callback,
passing error data as parameter. If any returns false, error won't be
sent to errbit.

This allows users to define fine grain filters for their javascript
exceptions, like filtering out any error on scripts not coming from
their domain :

Airbrake.addFilter( function( error ){
  return error.request_url.match( /^https?:\/\/my\.domain\.com\// )
});

A new `Airbrake.addFilter( callback )` method has been added.

Before sending any error, notifier.js will try each provided callback,
passing error data as parameter. If any returns false, error won't be
sent to errbit.

This allows users to define fine grain filters for their javascript
exceptions, like filtering out any error on scripts not coming from
their domain :

    Airbrake.addFilter( function( error ){
      return error.request_url.match( /^https?:\/\/my\.domain\.com\// )
    });
shingara added a commit that referenced this pull request Apr 25, 2014
ADD allow js client to add filters
@shingara shingara merged commit 6c55981 into errbit:master Apr 25, 2014
@shingara shingara added this to the 0.3.0 milestone Apr 25, 2014
@shingara
Copy link
Member

thanks

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.

None yet

2 participants