Fix an order-of-operations bug where API errors were being parsed (and potential exceptions thrown) before firing response hooks, meaning response hooks were not being triggered if an API call was unsuccessful.
Closes #321
Testing
New unit test to confirm response hook gets fired even when an API error occurs.
Pull Request Type
Please select the option(s) that are relevant to this PR.
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Improvement (fixing a typo, updating readme, renaming a variable name, etc)
Description
Fix an order-of-operations bug where API errors were being parsed (and potential exceptions thrown) before firing response hooks, meaning response hooks were not being triggered if an API call was unsuccessful.
Closes #321
Testing
Pull Request Type
Please select the option(s) that are relevant to this PR.