Skip to content

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

@armgitaar

Description

@armgitaar

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions