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(binding-http): re-introduce proper error message check #1111

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/binding-http/test/http-client-basic-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ class HttpClientBasicTest {
try {
await this.client.readResource({ href: "https://127.0.0.1:3001" });
} catch (error) {
// Note: depending on Node.js version different errors appear
// AssertionError: expected 'request to https://127.0.0.1:3001/ fa…' to deeply equal 'Client error: Unauthorized'
// error.message.should.eql("Client error: Unauthorized");
if (error instanceof Error) {
error.message.should.eql("Client error: Unauthorized");
} else {
fail("No proper error instance object");
}
return;
}
fail("should fail to authorize client with basic");
Expand Down