Skip to content
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
6 changes: 3 additions & 3 deletions src/node/services/tools/web_fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ describe("web_fetch tool", () => {
});

// Test HTTP error handling with body parsing
it("should include HTTP status code in error for 404 responses", async () => {
it("should include HTTP status code in error for non-2xx responses", async () => {
using testEnv = createTestWebFetchTool();
const args: WebFetchToolArgs = {
// GitHub returns a proper 404 page for nonexistent users
url: "https://github.com/this-user-definitely-does-not-exist-12345",
// httpbin.dev reliably returns the requested status code
url: "https://httpbin.dev/status/404",
};

const result = (await testEnv.tool.execute!(args, toolCallOptions)) as WebFetchToolResult;
Expand Down