-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: fetch HTTP retrievals directly #82
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When the retrieving the content using the Trustless HTTP Gateway protocol ("http"), fetch the content directly from the provider, do not use Lassie. This should give us better visibility into various error statuses returned by providers, e.g. 429 Too Many Requests, which Lassie converts to generic 502 Bad Gateway error. List of synthetic status codes corresponding to different errors we may encounter along the new codepath: - 900 - unknown error (fallback) - 901 - provider's multiaddr is not "tcp" - 902 - provider's multiaddr is not "https" - 903 - provider's multiaddr has too many parts - 911 - provider's hostname cannot be resolved via DNS - 912 - TCP connection error - 921 - CID uses an unsupported hash algorithm - 922 - payload's hash does not match the CID - 923 - provider returned unexpected blocks in the CAR response Signed-off-by: Miroslav Bajtoš <[email protected]>
Also: introduce a new synthetic status code 904 for unsupported host types (e.g. `ipv4` instead of `ip4`). Signed-off-by: Miroslav Bajtoš <[email protected]>
eeddfb8
to
50326d3
Compare
Signed-off-by: Miroslav Bajtoš <[email protected]>
bajtos
commented
Jul 9, 2024
bajtos
commented
Jul 9, 2024
juliangruber
approved these changes
Jul 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Miro! 👏
Signed-off-by: Miroslav Bajtoš <[email protected]>
Signed-off-by: Miroslav Bajtoš <[email protected]>
a7210a4
to
a573b58
Compare
bajtos
added a commit
that referenced
this pull request
Jul 9, 2024
Run the tests for the code checking error messages that may be platform specific, see #82. Signed-off-by: Miroslav Bajtoš <[email protected]>
Merged
bajtos
added a commit
that referenced
this pull request
Jul 9, 2024
Run the tests for the code checking error messages that may be platform specific, see #82. Signed-off-by: Miroslav Bajtoš <[email protected]>
bajtos
added a commit
that referenced
this pull request
Jul 9, 2024
Run the tests for the code checking error messages that may be platform specific, see #82. Signed-off-by: Miroslav Bajtoš <[email protected]>
Signed-off-by: Miroslav Bajtoš <[email protected]>
juliangruber
approved these changes
Jul 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!!
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When we're retrieving the content using the Trustless HTTP Gateway protocol ("http"), fetch the content directly from the provider, do not use Lassie.
This should give us better visibility into various error statuses returned by providers. For example, Lassie converts the error
429 Too Many Requests
to a generic error502 Bad Gateway
.List of synthetic status codes corresponding to different errors we may encounter along the new codepath:
ipv4
instead ofip4
)TODO:
Links: