Closed machelreid closed 4 years ago
My idea is that the problem appears when response does not has an actual response model and API error json model binding fails. It could happen when server return 500 for some unknown reason.
In my case I realised this issue when we sent a faulty file path. Only after making the change above I could see the actual error that was returned which was code 5007 - Unable to download remote file'. So that's not a random 500 error.
Thanks @mayaizart for the fix PR. Merged and released 1.1.1 version.
I'll be more specific as I've found where the issue is. When some sort of error occurs and an
ApiError
is thrown the following exception is thrown:The issue is that
self.message
is never defined in ApiError, therefore__str__
fails. Addingself
to where message is defined in__init__
will fix the issue.