redditwarp.exceptions#
- exception redditwarp.exceptions.ArgExcMixin(arg: object = None)[source]#
Bases:
ExceptionMixin exception class where the
argargument is used as the exception message.
- exception redditwarp.exceptions.ArgExc(arg: object = None)[source]#
Bases:
ArgExcMixin
- exception redditwarp.exceptions.OperationException(arg: object = None)[source]#
Bases:
ArgExcA class of exceptions for when the client needs to raise an artificial exception.
- exception redditwarp.exceptions.NoResultException(arg: object = None)[source]#
Bases:
OperationExceptionRaised when a requested target does not exist.
- exception redditwarp.exceptions.RejectedResultException(arg: object = None)[source]#
Bases:
OperationExceptionRaised when a returned value does not fulfil some invariant.
- exception redditwarp.exceptions.UnexpectedResultException(arg: object = None)[source]#
Bases:
OperationExceptionRaised when a certain result was not expected.
- exception redditwarp.exceptions.Throwaway(arg: object = None)[source]#
Bases:
ArgExcThese exceptions are not intended to be caught.
- exception redditwarp.exceptions.UserAgentRequired(arg: object = None)[source]#
Bases:
ThrowawayRaised when the client detects that the Reddit API wants you to set a user agent.
- redditwarp.exceptions.raise_for_non_json_response(resp: Response) None[source]#
Raise exceptions for a HTTP response from Reddit that does not contain JSON.
This function assumes the given response object does not contain JSON.
- exception redditwarp.exceptions.APIError(arg: object = None)[source]#
Bases:
OperationExceptionA formal API error.
- exception redditwarp.exceptions.RedditError(arg: object = None, *, label: str, explanation: str, field: str)[source]#
Bases:
APIErrorA Reddit error.
Errors from Reddit’s API typically consist of three pieces of information: an error label, an explanation, and the name of a related parameter field.
- label: str#
A label for the error. E.g.,
USER_REQUIRED,INVALID_OPTION,SUBREDDIT_NOEXIST. In rare cases this label may not always be in uppercase. It can even contain spaces.
- explanation: str#
A description for the error.
- field: str#
The name of the parameter relevant to the error, if applicable.
- redditwarp.exceptions.VanillaProviderAPIError#
alias of
RedditError