-
Notifications
You must be signed in to change notification settings - Fork 630
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
refactor(http): align additional error messages #5791
Conversation
Aligns the error messages in the `http` folder to match the style guide. denoland#5574
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5791 +/- ##
==========================================
- Coverage 96.23% 96.22% -0.02%
==========================================
Files 480 480
Lines 38748 38759 +11
Branches 5616 5616
==========================================
+ Hits 37291 37295 +4
- Misses 1416 1423 +7
Partials 41 41 ☔ View full report in Codecov by Sentry. |
http/cookie.ts
Outdated
@@ -131,7 +131,7 @@ function toString(cookie: Cookie): string { | |||
if (typeof cookie.maxAge === "number" && Number.isInteger(cookie.maxAge)) { | |||
if (cookie.maxAge < 0) { | |||
throw new RangeError( | |||
"Max-Age must be an integer superior or equal to 0. Cookie ignored.", | |||
`Cookie Max-Age must >= 0: received ${cookie.maxAge}`, |
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.
Can this be a bit more formal?
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.
Sorry for the grammar in that one. What about:
Cannot serialize cookie as Max-Age must be >= 0: received ${cookie.maxAge}
?
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.
LGTM
Aligns the error messages in the
http
folder to match the style guide.#5574