-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix(gateway): return HTTP 500 on namesys.ErrResolveFailed #150
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
|
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.
#156 Is merged, feel free to rebase and move tests from ipfs/kubo#9589 to this PR
3c9b71d
to
87e8bc6
Compare
@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
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.ErrResolveFailed
as 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 thenamesys
package.Sharness tests will fail here. See ipfs/kubo#9589.