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

Unexpected exception raised from HTTP ExceptionHandler "handle" method #1

Open
armgitaar opened this issue Aug 26, 2020 · 1 comment

Comments

@armgitaar
Copy link

armgitaar commented Aug 26, 2020

Thanks for these examples!

I used them while testing out deploying Adonis v5 apps with Cleaver and they were extremely helpful.

The project was running fine on my local; but then I kept getting the following error after deploying.

Unexpected exception raised from HTTP ExceptionHandler "handle" method

Stack:
Exception: Invalid guard "/login". Make sure the guard is defined inside the config/auth file
at AuthManager.makeMapping

Basically, the experience was users weren't being redirect to /loginpage.

I ended up updating the dependencies to more current and was able to repro on my local and then saw IntelliJ was giving me the hint to update redirectTo route in Auth.ts for AuthenticationException to a guard. Swapped '/login' with 'web' and, voila! All good on local and prod.

Thanks again for all of your helpful resources!

@ammezie
Copy link
Contributor

ammezie commented Aug 26, 2020

I think there have been some changes in recent versions auth module.

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

2 participants