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

Fix dialyzer reporting unmatched_return for Sentry.PlugCapture #475

Merged
merged 1 commit into from
May 2, 2021
Merged

Conversation

maxwowo
Copy link

@maxwowo maxwowo commented Apr 28, 2021

This issue is similar to #436. Basically the return type of Sentry.capture_message/2 is {:ok, Task.t() | String.t() | pid()} | {:error, any()} | :unsampled | :excluded | :ignored which is not handled, causing Dialyzer to complain about unmatched returns. Adding a _ = as was done in the aforementioned PR silenced it. My Dialyzer configuration is below in case it's of any interest.

dialyzer: [
  flags: [
    :unmatched_returns,
    :error_handling,
    :race_conditions,
    :no_opaque,
    :underspecs
  ],
  plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],

@mitchellhenke
Copy link
Contributor

Thank you for the pull request! 💖

@mitchellhenke mitchellhenke merged commit 02a2cc3 into getsentry:master May 2, 2021
@ianko
Copy link

ianko commented Sep 28, 2021

@mitchellhenke This PR did not make into a published version yet.

Any ideia when we can have a new version?

@mitchellhenke
Copy link
Contributor

@ianko thanks for raising this! I've released 8.0.6 with this fix and a few others

https://hexdocs.pm/sentry/8.0.6

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