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

Better error handling for crux_http #201

Merged
merged 3 commits into from
Feb 6, 2024
Merged

Better error handling for crux_http #201

merged 3 commits into from
Feb 6, 2024

Conversation

charypar
Copy link
Member

@charypar charypar commented Feb 5, 2024

This should allow apps to handle HTTP errors better and provide special error handling for bad requests, unauthorized requests and other common situations that can be handled gracefully.

There are two changes

  • A nicer error type which is easier to work with
  • When using the event returning API, response status in the 4xx and 5xx range is considered an Err not an Ok

@charypar charypar changed the title Better error type for crux_http Better error handling for crux_http Feb 6, 2024
@charypar charypar merged commit 8dc5f77 into master Feb 6, 2024
9 checks passed
@charypar charypar deleted the http-error-handling branch February 6, 2024 14:33
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.

3 participants