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

ignore certain types of errors #16

Merged
merged 2 commits into from
Nov 2, 2016

Conversation

thousandsofthem
Copy link
Contributor

Adds ability to ignore errors you do not want to log

@fazibear
Copy link
Owner

What about test for this feature ?

@fazibear fazibear reopened this Jul 12, 2016
@thousandsofthem
Copy link
Contributor Author

Sorry, no idea how to test plug. any advices/examples?

Airbrakex.ExceptionParser.parse(exception)
|> Airbrakex.Notifier.notify([params: conn.params, session: session])
error = Airbrakex.ExceptionParser.parse(exception)
if proceed?(error) do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proceed?(Application.get_env(:airbrakex, :ignore), error) is better solution. Use pattern matching to match all cases and test this functions separately.

@thousandsofthem
Copy link
Contributor Author

Thanks, implemented. Testing plug is still the issue, naive approach didn't work for me

@thousandsofthem
Copy link
Contributor Author

@fazibear any updates here?

@joshuaswilcox
Copy link

Can we get this merged?

@fazibear fazibear merged commit 9360d35 into fazibear:master Nov 2, 2016
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.

3 participants