code: def exception(cls, method, uri, response, message):
          
          # noinspection PyBroadException
          try:
              error_payload = json.loads(response.text)
              if 'message' in error_payload:
                  message = '{}: {}'.format(message, error_payload['message'])
              code = error_payload.get('code', response.status_code)
              return TwilioRestException(response.status_code, uri, message, code, method)
          except Exception:
              return TwilioRestException(response.status_code, uri, message, response.status_code, method)
docs: Wraps an exceptional response in a `TwilioRestException`.