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

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

Merged
merged 1 commit into from
Apr 30, 2024
Merged

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
7 checks passed
@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