Client: Add response to the ApiError Exception class

Currently the exception fails in the __str__ method because if tries to check the status of self.response, which is not assigned. This fix ensures self.response is set so the check for self.response.status_code can be performed.

I couldn't find any CLA to sign, let me know if this is required.