Exceptions should be handled even when DEBUG = True.
Consider the NotAllowedToDisconnect exception. This exception is very closely related to the application UX. It is an expected exception. What I mean is, as a developer, I know that if a user tries to disconnect without providing a password, this exception will be raised. So I'll have to write appropriate code to prepare for that case, like to redirect user to a certain page or ask them to set a password.
This is part of the development process. But right now, I have to turn off DEBUG mode or override SocialAuthExceptionMiddleware.raise_exception to write code for this scenario.
Exceptions should be handled even when
DEBUG = True
.Consider the
NotAllowedToDisconnect
exception. This exception is very closely related to the application UX. It is an expected exception. What I mean is, as a developer, I know that if a user tries to disconnect without providing a password, this exception will be raised. So I'll have to write appropriate code to prepare for that case, like to redirect user to a certain page or ask them to set a password.This is part of the development process. But right now, I have to turn off
DEBUG
mode or overrideSocialAuthExceptionMiddleware.raise_exception
to write code for this scenario.