in uber_rides/client.py [0:0]
def __init__(self, response, message=None):
"""
Parameters
response (requests.Response)
The HTTP response from an API request.
message (str)
An error message string. If one is not provided, the
default message is used.
"""
if not message:
message = (
'Surge pricing is currently in effect for this product. '
'User must confirm surge by visiting the confirmation url.'
)
super(SurgeError, self).__init__(
response=response,
message=message,
)
surge_href, surge_id = self.adapt_meta(self.meta)
self.surge_confirmation_href = surge_href
self.surge_confirmation_id = surge_id