I use abort(401, "something")
in my code and catch the exception with a function
@app.exception(Unauthorized)
async def handle_401s(request, exception: Unauthorized):
print(exception.message)
return response.json({"err": exception.message})
It always returns 500.
When I checked the source code I found that the param message
had not been set to class Unauthorized. Please tell me a way to get message from exception. Thanks