Skip to content

Add dedicated error types for each of the error statuses#158

Merged
chriso merged 1 commit intomainfrom
error-classes
Apr 30, 2024
Merged

Add dedicated error types for each of the error statuses#158
chriso merged 1 commit intomainfrom
error-classes

Conversation

@chriso
Copy link
Contributor

@chriso chriso commented Apr 30, 2024

Dispatch does a good job of categorizing errors automatically. In some cases though it doesn't have enough information to be able to choose the correct function call status.

For example, in the GitHub example, the function has to manually check for a 403 response when a rate limit has been exceeded, and has no way of signalling to the Dispatch handler that it's a throttling error rather than a 403 Forbidden error.

This PR adds new error types that users can use in these cases.

@chriso chriso self-assigned this Apr 30, 2024
@chriso chriso merged commit a859935 into main Apr 30, 2024
@chriso chriso deleted the error-classes branch April 30, 2024 23:35
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