Exceptions
            pokelance.exceptions
⚓︎
    
              AudioNotFound(message, route, status)
⚓︎
    
              BadRequest(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when a bad request is made. [HTTP 400]
Source code in pokelance/exceptions.py
                    
                  
              Forbidden(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when forbidden. [HTTP 403]
Source code in pokelance/exceptions.py
                    
                  
              HTTPException(message, route, status)
⚓︎
    
              Bases: PokeLanceException
Base exception class for HTTP exceptions.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
message | 
            
                  str
             | 
            
               The message to display.  | 
            required | 
route | 
            
                  Route
             | 
            
               The route that caused the exception.  | 
            required | 
status | 
            
                  int
             | 
            
               The status code of the exception.  | 
            required | 
Attributes:
| Name | Type | Description | 
|---|---|---|
message | 
            
                  str
             | 
            
               The message to display.  | 
          
route | 
            
                  Route
             | 
            
               The route that caused the exception.  | 
          
status | 
            
                  int
             | 
            
               The status code of the exception.  | 
          
Source code in pokelance/exceptions.py
                    
                  
              ImageNotFound(message, route, status)
⚓︎
    
              MethodNotAllowed(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when a method is not allowed. [HTTP 405]
Source code in pokelance/exceptions.py
                    
                  
              NotFound(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when a resource is not found. [HTTP 404]
Source code in pokelance/exceptions.py
                    
                  
              PokeLanceException(message, route)
⚓︎
    
              Bases: Exception
Base exception class for PokeLance.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
message | 
            
                  str
             | 
            
               The message to display.  | 
            required | 
route | 
            
                  Route
             | 
            
               The route that caused the exception.  | 
            required | 
Attributes:
| Name | Type | Description | 
|---|---|---|
message | 
            
                  str
             | 
            
               The message to display.  | 
          
route | 
            
                  Route
             | 
            
               The route that caused the exception.  | 
          
Source code in pokelance/exceptions.py
                    
                  
              ResourceNotFound(message, route, status, suggestions=None)
⚓︎
    
              Bases: NotFound
Exception raised when a resource is not found.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
message | 
            
                  str
             | 
            
               The message to display.  | 
            required | 
route | 
            
                  Route
             | 
            
               The route that caused the exception.  | 
            required | 
status | 
            
                  int
             | 
            
               The status code of the exception.  | 
            required | 
suggestions | 
            
                  Optional[List[str]]
             | 
            
               Possible suggestions for the resource.  | 
            
                  None
             | 
          
Source code in pokelance/exceptions.py
                    
                  
              Unauthorized(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when unauthorized. [HTTP 401]
Source code in pokelance/exceptions.py
                    
                  
              UnknownError(message, route, status)
⚓︎
    
              Bases: HTTPException
Exception raised when an unknown error occurs.
Source code in pokelance/exceptions.py
                    
                  
            get_exception(status)
⚓︎
    Gets an exception from the status code.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
status | 
            
                  int
             | 
            
               The status code.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  HTTPException
             | 
            
               The exception.  | 
          
Source code in pokelance/exceptions.py
              | Python | |
|---|---|