This should fix #78 while at the same time keeping #47 resolved.
Instead of using except type(self.not_authenticated_exception), except Exception as _e is now used, which should catch any error and not just of the type of the user defined custom exception. Even tough this is normally not desired it seems to be the only way to support instances of fastapi.HTTPException and normal subclasses of Exception.
This should fix #78 while at the same time keeping #47 resolved.
Instead of using
except type(self.not_authenticated_exception)
,except Exception as _e
is now used, which should catch any error and not just of the type of the user defined custom exception. Even tough this is normally not desired it seems to be the only way to support instances offastapi.HTTPException
and normal subclasses ofException
.