Skip to content

'Unauthorized' error message outputted before customaized error handler in '@auth()' #643

@ockan

Description

@ockan

I code

@app.exception_handler(404)
@app.exception_handler(500)
@app.exception_handler(403)
@app.exception_handler(401)
async def all_error(appl, request, exc):
    context = {'status_code': exc.status, 'message': exc.args[0]}
    return await view_async("err.html", **context)

but if @auth() failed, a message ''Unauthorized' directly output to the browser, not my customaized renderring page.

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