fix(gateway): return HTTP 500 on namesys.ErrResolveFailed#150
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #150 +/- ##
==========================================
+ Coverage 29.19% 29.41% +0.21%
==========================================
Files 96 99 +3
Lines 11018 11093 +75
==========================================
+ Hits 3217 3263 +46
- Misses 7448 7472 +24
- Partials 353 358 +5
|
2 tasks
Member
Author
lidel
requested changes
Feb 15, 2023
Member
There was a problem hiding this comment.
#156 Is merged, feel free to rebase and move tests from ipfs/kubo#9589 to this PR
3c9b71d to
87e8bc6
Compare
Member
Author
|
@lidel sharness will also fail here, as there is a single sharness test that checks the status code for this cases. See ipfs/kubo#9589 for Kubo PR. |
87e8bc6 to
77fb194
Compare
lidel
approved these changes
Feb 22, 2023
This file contains hidden or 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
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.
Fixes ipfs/kubo#9514.
There's a catch here. AFAIK, there is no good way of distinguishing between a non-existing DNSLink entry and an IPNS key that cannot be resolved. With this PR, both return 500 Internal Server Error, as both return
namesys.ErrResolveFailedas error. What do you think @lidel? If we want to treat both errors the same way, I think it's good to go. Otherwise, we may need further changes in thenamesyspackage.Sharness tests will fail here. See ipfs/kubo#9589.