From 2dca7acbc4a5c9f07b13b22016c1e8d12aea9de3 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 9 Aug 2016 17:54:07 -0400 Subject: [PATCH] Add missing exception class for '502 Bad Gateway' response code. We do see such (transient) errors in the wild. --- gcloud/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcloud/exceptions.py b/gcloud/exceptions.py index f42d2806f3fe..b1072bbf134d 100644 --- a/gcloud/exceptions.py +++ b/gcloud/exceptions.py @@ -151,6 +151,11 @@ class MethodNotImplemented(ServerError): code = 501 +class BadGateway(ServerError): + """Exception mapping a '502 Bad Gateway' response.""" + code = 502 + + class ServiceUnavailable(ServerError): """Exception mapping a '503 Service Unavailable' response.""" code = 503