avadev/AvaTax-REST-V2-Python-SDK

Ava Logger raises KeyError on ConnectionError

snakeclown opened this issue · 3 comments

When a ConnectionError is raised using the AvataxClient (at least during an adjust_transaction) the following code errors because the ava_log_entry only contains an error key and no execution_time key...

>           if ava_log_entry["execution_time"] is None:
E           KeyError: 'execution_time'

From my reading, if running the wrapped func at line 39 raises an Exception the ava_log_entry will have no "execution_time" key.

Forgive me if I've missing something here, this is showing up in our unit tests and I'm no pythonista/pythoneer

@han8909227 @contygm Would it be possible to release a new version with this bugfix?

We are releasing it today @frallain

Released as part of the 23.3.0 release.