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

Remove impossible case #7

Closed
wants to merge 1 commit into from
Closed

Conversation

aaronjensen
Copy link
Contributor

According to dialyzer, this case is impossible. I would guess it has to do with what lookup/1 is capable of returning. It's not capable of returning anything that would trigger the case of extract_error_metadata/3 that would return nil.

endpoint.ex:53: The pattern {_, 'nil'} can never match the type {_,{atom(),binary(),_,_}}

It could be a dialyzer bug, there are a few nasty ones in 19.

According to dialyzer, this case is impossible.
@arjan
Copy link
Contributor

arjan commented Sep 14, 2016

By just looking at the code, I see a case where nil is returned from extract_error_metadata/3, namely when the plug_status < 500. In that case we don't report an error because non-500 HTTP errors are not logged to AppSignal.

I'll see if I can reproduce this with dialyzer.

@aaronjensen
Copy link
Contributor Author

Fixed properly in #8 I believe.

@aaronjensen aaronjensen deleted the patch-1 branch September 14, 2016 14:45
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