MCPcopy Create free account
hub / github.com/Noumena-Network/code / makeRedirectError

Function makeRedirectError

src/tools/WebFetchTool/utils.test.ts:42–52  ·  view source on GitHub ↗
(status: number, location: string)

Source from the content-addressed store, hash-verified

40}
41
42function makeRedirectError(status: number, location: string): Error {
43 return {
44 isAxiosError: true,
45 name: 'AxiosError',
46 message: `Redirect ${status}`,
47 response: {
48 status,
49 headers: { location },
50 },
51 } as unknown as Error
52}
53
54describe('WebFetch URL validation', () => {
55 it('accepts only public-looking http and https URLs without credentials', () => {

Callers 1

utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected