From 9a5214234cb39eef46ef0c218c935ff6a7838b1e Mon Sep 17 00:00:00 2001 From: Matt Wisniewski Date: Thu, 4 Oct 2018 20:58:17 -0400 Subject: [PATCH] add error class for 504s --- recurly/errors.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/recurly/errors.py b/recurly/errors.py index b482864b..c4d38df9 100644 --- a/recurly/errors.py +++ b/recurly/errors.py @@ -299,6 +299,16 @@ class ServiceUnavailableError(ServerError): pass +class GatewayTimeoutError(ServerError): + """An error indicating the service is temporarily unavailable. + + This error results from an HTTP ``504 Gateway Timeout`` + response. Try the request again. + + """ + pass + + class UnexpectedStatusError(ResponseError): """An error resulting from an unexpected status code returned by @@ -325,6 +335,7 @@ def __unicode__(self): 500: InternalServerError, 502: BadGatewayError, 503: ServiceUnavailableError, + 504: GatewayTimeoutError, }