Skip to content

Commit 3ec3d75

Browse files
committed
improve invalid value message
1 parent 156bc63 commit 3ec3d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Cookie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Cookie implements Cookie.CookieOptions {
5454
if (!Cookie.TOKEN.test(name))
5555
throw new SyntaxError(`Cookie name "${name}" is not a valid "token" as per RFC 2616, Section 2.2.`);
5656
if (!Cookie.COOKIE_OCTET.test(value))
57-
throw new SyntaxError(`Cookie "${name}" value "${value}" is not a valid "*cookie-octet" as per RFC 6265, Section 4.1.1.`);
57+
throw new SyntaxError(`In cookie "${name}", value "${value}" is not a valid "*cookie-octet" as per RFC 6265, Section 4.1.1.`);
5858
this.name = name;
5959
this.value = value;
6060
this.domain = options?.domain;

0 commit comments

Comments
 (0)