Skip to content

Conversation

CronofyMatt
Copy link
Contributor

Updates a number of older endpoints to make use of the GetValidResponse helper on the HTTP client class. This means we will include the response body of any API failures in the exception that gets raised. This will enable consumers to understand more about what has gone wrong, and potentially filter out cases where the errors can be safely ignored (for example a not_found error when deleting an external event). This helper is already used for the majority of the other API operations, introducing it along these remaining paths will improve consistency.

Copy link
Contributor

@ColBeanz ColBeanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one example which needs to be left as is, due to it being incompatible with GetValidResponse.

See comment

Copy link
Contributor

@ColBeanz ColBeanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we're simple expanding an existing pattern across to older endpoints.

@cronofy cronofy deleted a comment from ColBeanz Aug 30, 2024
@CronofyMatt CronofyMatt merged commit b8887ce into master Aug 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants