Skip to content
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

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

irbull
Copy link
Contributor

@irbull irbull commented Aug 23, 2024

Aligns the error messages in the http folder to match the style guide.

#5574

Aligns the error messages in the `http` folder to match the style guide.

denoland#5574
@irbull irbull requested a review from kt3k as a code owner August 23, 2024 05:10
@github-actions github-actions bot added the http label Aug 23, 2024
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.22%. Comparing base (c817a5a) to head (8556b75).
Report is 16 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

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}`,
Copy link
Member

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?

Copy link
Contributor Author

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}?

http/cookie.ts Outdated Show resolved Hide resolved
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k kt3k merged commit 3c2ac9f into denoland:main Aug 26, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants