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

test(http): fix error message of unknown issuer #1681

Merged
merged 1 commit into from
Dec 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions http/server_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Deno.test(`Server.listenAndServeTls should handle requests`, async () => {
await assertThrowsAsync(
() => badConn.read(new Uint8Array(1)),
Deno.errors.InvalidData,
"invalid certificate: UnknownIssuer",
"invalid peer certificate contents: invalid peer certificate: UnknownIssuer",
"Read with missing certFile didn't throw an InvalidData error when it should have.",
);

Expand Down Expand Up @@ -553,7 +553,7 @@ Deno.test({
await assertThrowsAsync(
() => badConn.read(new Uint8Array(1)),
Deno.errors.InvalidData,
"invalid certificate: UnknownIssuer",
"invalid peer certificate contents: invalid peer certificate: UnknownIssuer",
Copy link
Member

Choose a reason for hiding this comment

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

We should fix the error message to be less verbose in Deno. The old one seems to be on point.

Copy link
Member

Choose a reason for hiding this comment

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

It will be hard as this error is surfaced from rustls and we'd have to manually rewrite it. I think it's not worth it.

"Read with missing certFile didn't throw an InvalidData error when it should have.",
);

Expand Down Expand Up @@ -730,7 +730,7 @@ Deno.test(`Server.listenAndServeTls should handle requests`, async () => {
await assertThrowsAsync(
() => badConn.read(new Uint8Array(1)),
Deno.errors.InvalidData,
"invalid certificate: UnknownIssuer",
"invalid peer certificate contents: invalid peer certificate: UnknownIssuer",
"Read with missing certFile didn't throw an InvalidData error when it should have.",
);

Expand Down