Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Fire response hook before parsing API error to avoid early exit #323

Conversation

nwithan8
Copy link
Member

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

  • 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.

  • 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)

- Remove dead code from unit test
@nwithan8 nwithan8 merged commit f15ce3c into master Jul 24, 2024
18 checks passed
@nwithan8 nwithan8 deleted the 321-feat-ability-to-extract-metrics-for-example-for-spring-based-apps-easily-by-making-sure-the-requestor-is-pluggable branch July 24, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants