docs: def _fail(response):
          """
          Raise an ApiFailure pertaining to the given response
          """
          message = "Status code: {}-{}, url: {}".format(response.status_code, response.reason, response.url)
          try:
              message += ", message:{}".format(response.json()["message"])
          except (ValueError, KeyError):
              pass
          raise ApiFailure(message, response.status_code)