Warnings : ElixirLS Dialyzer The function call will not succeed

The function call will not succeed.

ExInsights.track_exception(
  _ :: %{:__exception__ => true, :__struct__ => atom(), atom() => _},
  _ :: [{atom(), atom(), [any()] | byte(), [{:file, string()} | {:line, pos_integer()}]}]
)

will never return since the 1st arguments differ
from the success typing arguments:

(binary(), [
  {(... -> any), [any()] | non_neg_integer(), [{_, _}]}
  | {atom(), atom(), [any()] | non_neg_integer(), [{_, _}]}
])

ElixirLS Dialyzer

I am getting this warning in the controller.ex, not getting the root cause, please help.

It will help if you also post the source code of the function.

What version of ex_insights are you running? Versions prior to this commit:

have a spec for track_exception that only accepts a binary in the first argument.

1 Like

The current version is ex_insights, “~> 0.5”.
As the application code is existing one and there is no change in the code level, now getting these warnings in all the files.

I tried upgrading to version 0.8, but still it gives warnings.

Fixed this issue by upgrading to ex_insights 0.8 with required config changes. Thank you.

1 Like