Skip to content

Commit

Permalink
Merge pull request #1111 from danielpeintner/issue-837
Browse files Browse the repository at this point in the history
refactor(binding-http): re-introduce proper error message check
  • Loading branch information
relu91 authored Oct 10, 2023
2 parents 7cbe593 + e6a2be7 commit b705ce3
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit b705ce3

Please sign in to comment.