The ApiClientError will be used to report errors for many different types of clients, so we need an easy way to map an error to a particular client.
The error already saves the server_url, which could be potentially used for that, but if for some reason any user wants to instantiate 2 clients with the same URL, this won't be enough.
Proposed solution
Save a client property in the error instance too, pointing to the API client that generated the error.
What's needed?
The
ApiClientError
will be used to report errors for many different types of clients, so we need an easy way to map an error to a particular client.The error already saves the
server_url
, which could be potentially used for that, but if for some reason any user wants to instantiate 2 clients with the same URL, this won't be enough.Proposed solution
Save a
client
property in the error instance too, pointing to the API client that generated the error.