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

[Feature] Add standalone HttpError response error type #288

Closed
mattsse opened this issue Mar 12, 2024 · 2 comments · Fixed by #849
Closed

[Feature] Add standalone HttpError response error type #288

mattsse opened this issue Mar 12, 2024 · 2 comments · Fixed by #849
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@mattsse
Copy link
Member

mattsse commented Mar 12, 2024

Component

rpc

Describe the feature you would like

return Err(TransportErrorKind::custom_str(&format!(
r#"HTTP error: {} with body: "{}""#,
status,
String::from_utf8_lossy(body.as_ref())
)));

this makes it very hard to check for HTTP errors for things like retry:

foundry-rs/foundry#7384

TODO

add a standalone Error struct so we can try downcasting this from the Custom variant, though perhaps this should even be its own variant

FYI: @zerosnacks

Additional context

No response

@mattsse mattsse added the enhancement New feature or request label Mar 12, 2024
@prestwich prestwich added good first issue Good for newcomers 0.1-rc.0 labels Jun 3, 2024
@DaniPopes DaniPopes added this to the 0.1-rc.0 milestone Jun 5, 2024
@DaniPopes DaniPopes removed the 0.1-rc.0 label Jun 5, 2024
@prestwich
Copy link
Member

extend TransportErrorKind too

@mattsse mattsse linked a pull request Jun 10, 2024 that will close this issue
3 tasks
@prestwich
Copy link
Member

should this be done in a separate PR, as retry layer seems pretty big and a ways off from completion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants