def _handle_authentication_error ( self ) : response = make_response ( 'Access Denied' ) response . headers [ 'WWW-Authenticate' ] = self . auth . get_authenticate_header ( ) response . status_code = 401 return response
if status code is 401 what should we do in python
Return an authentication error .
def _handle_authentication_error(self):
        """
        Return an authentication error.
        """
        response = make_response('Access Denied')
        response.headers['WWW-Authenticate'] = self.auth.get_authenticate_header()
        response.status_code = 401
        return response