nuagenetworks / vspk-python

A Python library for managing Nuage through its API
http://www.nuagenetworks.net
BSD 3-Clause "New" or "Revised" License
17 stars 19 forks source link

Asynchronous calls don't aways run the callback #29

Open mainTAP opened 6 years ago

mainTAP commented 6 years ago

Hello,

I've noticed that when asynchornous call is being used and the authentification token expires, the call never runs the callback.

If synchorous call is used, the call uses BambouHTTPError exception with error code 401.

When asynchronous call encouter error 404, it does run the provided callback and the response can be checked for the status_code, but this doesn't happen in case of error 401 ( haven't managed to try with all the other error events ) Would it be possible to make the asynchronous calls to run the callback in all ocasions in order to deal with possile errors returned back from the API ?

Many thanks.