-
Notifications
You must be signed in to change notification settings - Fork 148
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(http, server): handle missing resources with http 404 #367
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #367 +/- ##
==========================================
+ Coverage 63.92% 64.06% +0.14%
==========================================
Files 41 41
Lines 4102 4121 +19
Branches 489 493 +4
==========================================
+ Hits 2622 2640 +18
- Misses 1468 1469 +1
Partials 12 12 β View full report in Codecov by Sentry. |
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.
Thanks!
Small behavior changes to be documented in release notes:
- HTTP server throws 404 for uneset values. This requires unstorage clients to update to the latest version to support handling
- HTTP driver throws error for
hasItem
when response is not 404 (previously always returningnull
)
π Linked issue
unjs/ipx#204
β Type of change
π Description
HTTP driver did not properly return
null
when resource was not found. The error was masked bycreateStorageServer
newer throwing 404 as actual HTTP server should. This PR makes thecreateStorageServer
return 404 andhttp
driver to properly catch 404 and returnnull
.I have ran the changes against #365 and the behavior stays the same.
π Checklist