Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions shotgun_api3/shotgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,14 @@ def _call_rpc(self, method, params, include_script_name=True, first=False):
}
http_status, resp_headers, body = self._make_call("POST",
self.config.api_path, encoded_payload, req_headers)
LOG.debug("Completed rpc call to %s" % (method))
LOG.debug("Completed rpc call to %s" % (method))
try:
self._parse_http_status(http_status)
except ProtocolError, e:
if e.errcode == 503:
e.reason = "Shotgun is currently down for maintenance. Please try again later."
raise

self._parse_http_status(http_status)
response = self._decode_response(resp_headers, body)
self._response_errors(response)
response = self._transform_inbound(response)
Expand Down Expand Up @@ -1309,6 +1314,8 @@ def _parse_http_status(self, status):

if status[0] >= 300:
msg = "HTTP error from server"
if status[0] == 503:
reason = "Shotgun is currently down for maintenance. Please try again later."
raise ProtocolError(self.config.server,
error_code,
reason,
Expand Down