Errors¶
- exception somerandomapi.errors.BadRequest[source]¶
Bases:
SomeRandomApiExceptionBad Requesterror.
- exception somerandomapi.errors.Forbidden[source]¶
Bases:
SomeRandomApiExceptionForbiddenerror.
- exception somerandomapi.errors.HTTPException[source]¶
Bases:
SomeRandomApiExceptionException raised when an HTTP request fails.
- exception somerandomapi.errors.ImageError[source]¶
Bases:
SomeRandomApiExceptionException raised when an image could not be retrieved.
- exception somerandomapi.errors.InternalServerError[source]¶
Bases:
SomeRandomApiExceptionInternal Server Errorerror.
- exception somerandomapi.errors.NotFound[source]¶
Bases:
SomeRandomApiExceptionNot Founderror.
- exception somerandomapi.errors.RateLimited[source]¶
Bases:
SomeRandomApiExceptionToo Many Requestserror.
- exception somerandomapi.errors.SomeRandomApiException[source]¶
Bases:
ExceptionBase exception for all errors raised by this library.
- data¶
The data returned by the API.
- Type:
Any
- endpoint¶
The endpoint that was called. Use
endpoint.pathto get the full path of the endpoint.- Type:
Endpoint
- exception somerandomapi.errors.TypingError[source]¶
Bases:
TypeErrorException raised when a typing error occurs.
This is usually raised in a dataclass when a type is not what it is supposed to be.
- cls¶
The class that the error occurred in.
- Type:
BaseModel
- attribute¶
The attribute that the error occurred in. Use
attribute.nameto get the name of the attribute (argument).- Type:
Attribute