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

Calling encode_from_hooked causes error after recent commit #247

Closed
NilsLattek opened this issue Jan 4, 2017 · 3 comments
Closed

Calling encode_from_hooked causes error after recent commit #247

NilsLattek opened this issue Jan 4, 2017 · 3 comments

Comments

@NilsLattek
Copy link
Contributor

Commit 1deca7f changed the pattern matching in guardian.ex line 100 from :ok to {:ok, _}:

case call_after_encode_and_sign_hook(
      resource,
      type,
      claims_from_hook, jwt
) do
      {:ok, _} -> {:ok, jwt, claims_from_hook}
      {:error, reason} -> {:error, reason}
end

But the default return value of the after_encode_and_sign is still just :ok, so we get the error no case clause matching: :ok.
hooks.ex:
def after_encode_and_sign(_, _, _, _), do: :ok

@geofflane
Copy link
Contributor

+1 Seeing this as well.

@blatyo
Copy link

blatyo commented Jan 6, 2017

Could you also retire this version or release a new version? Right now, if you don't fix the version to 0.14.0, you'll hit the issue.

https://hex.pm/docs/tasks#hex_retire

@doomspork
Copy link
Member

0.14.2 has been released. I'll retire 0.14.1 later today.

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

No branches or pull requests

4 participants