Exceptions in PRAW

In addition to exceptions under the praw.exceptions namespace shown below, exceptions might be raised that inherit from prawcore.PrawcoreException. Please see the following resource for information on those exceptions: https://github.com/praw-dev/prawcore/blob/master/prawcore/exceptions.py

praw.exceptions

PRAW exception classes.

Includes two main exceptions: APIExeception for when something goes wrong on the server side, and ClientException when something goes wrong on the client side. Both of these classes extend PRAWException.

exception praw.exceptions.APIException(error_type, message, field)

Indicate exception that involve responses from reddit’s API.

__getitem__

x.__getitem__(y) <==> x[y]

__init__(error_type, message, field)

Construct an APIException.

Parameters:
  • error_type – The error type set on reddit’s end.
  • message – The associated message for the error.
  • field – The input field associated with the error if available.
exception praw.exceptions.ClientException

Indicate exceptions that don’t involve interaction with reddit’s API.

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

exception praw.exceptions.PRAWException

The base PRAW Exception that all other exception classes extend.

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(...) initializes x; see help(type(x)) for signature