tinyapi/serving.py
def error_handler(self, code: int, start_response: typing.Callable) -> None:
        """
            This method is the entry point of the error handler.
            It will dispatch the error to the callback of the error rule.
        """
        error_rule = self.get_error_rule(code)
        if error_rule is None:
            self.not_found(start_response)
            return [self.get_isinstance(self.get_error_rule(404).callback())]

        start_response(f"{self.get_status_message(code)}", [("Content-Type", "text/html")])
        return [self.get_isinstance(error_rule.callback())]

            This method is the entry point of the error handler.
            It will dispatch the error to the callback of the error rule.
        
This method is the entry point of the error handler.
It will dispatch the error to the callback of the error rule.
This method is the entry point of the error handler . It will dispatch the error to the callback of the error rule .
def error_handler(self, code: int, start_response: typing.Callable) -> None:
        error_rule = self.get_error_rule(code)
        if error_rule is None:
            self.not_found(start_response)
            return [self.get_isinstance(self.get_error_rule(404).callback())]
        start_response(f"{self.get_status_message(code)}", [("Content-Type", "text/html")])
        return [self.get_isinstance(error_rule.callback())]
def error_handler ( self , code : int , start_response : typing . Callable ) -> None : error_rule = self . get_error_rule ( code ) if error_rule is None : self . not_found ( start_response ) return [ self . get_isinstance ( self . get_error_rule ( 404 ) . callback ( ) ) ] start_response ( f"{self.get_status_message(code)}" , [ ( "Content-Type" , "text/html" ) ] ) return [ self . get_isinstance ( error_rule . callback ( ) ) ]
This method is the entry point of the error handler.
This method is the entry point of the error handler .
"""
            This method is the entry point of the error handler.
            It will dispatch the error to the callback of the error rule.
        """
self
code
int
start_response
typing.Callable