fix: enhanced provider api key fallback behavior #7307
Triggered via pull request
September 24, 2024 17:37
Status
Failure
Total duration
8m 46s
Artifacts
–
Annotations
4 errors
packages/rainbowkit/src/core/network/enhancedProvider.test.ts > createHttpClient > should return 'ok' status for health check endpoint:
packages/rainbowkit/src/core/network/internal/rainbowFetch.ts#L98
Error: Invalid API Key.
❯ generateError packages/rainbowkit/src/core/network/internal/rainbowFetch.ts:98:36
❯ rainbowFetch packages/rainbowkit/src/core/network/internal/rainbowFetch.ts:55:17
❯ packages/rainbowkit/src/core/network/enhancedProvider.test.ts:19:22
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { constructor: 'Function<Response>', type: 'basic', url: 'https://enhanced-provider.rainbow.me/healthcheck', redirected: false, status: 401, ok: false, statusText: 'Unauthorized', headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, body: { constructor: 'Function<ReadableStream>', locked: true, cancel: 'Function<cancel>', getReader: 'Function<getReader>', pipeThrough: 'Function<pipeThrough>', pipeTo: 'Function<pipeTo>', tee: 'Function<tee>', values: 'Function<values>' }, bodyUsed: true, clone: 'Function<clone>', blob: 'Function<blob>', arrayBuffer: 'Function<arrayBuffer>', text: 'Function<text>', json: 'Function<json>', formData: 'Function<formData>', bytes: 'Function<bytes>' }, responseBody: { error: 'Invalid API Key.' }, requestBody: undefined }
|
packages/rainbowkit/src/core/network/enhancedProvider.test.ts > createHttpClient > should throw an error if endpoint doesn't exist:
packages/rainbowkit/src/core/network/enhancedProvider.test.ts#L28
AssertionError: expected [Function] to throw error including 'Not Found' but got 'Invalid API Key.'
Expected: "Not Found"
Received: "Invalid API Key."
❯ packages/rainbowkit/src/core/network/enhancedProvider.test.ts:28:5
|
packages/rainbowkit/src/core/network/enhancedProvider.test.ts > createHttpClient > should resolve ENS name for a valid address:
packages/rainbowkit/src/core/network/internal/rainbowFetch.ts#L98
Error: Invalid API Key.
❯ generateError packages/rainbowkit/src/core/network/internal/rainbowFetch.ts:98:36
❯ rainbowFetch packages/rainbowkit/src/core/network/internal/rainbowFetch.ts:55:17
❯ packages/rainbowkit/src/core/network/enhancedProvider.test.ts:35:22
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { response: { constructor: 'Function<Response>', type: 'basic', url: 'https://enhanced-provider.rainbow.me/v1/resolve-ens?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', redirected: false, status: 401, ok: false, statusText: 'Unauthorized', headers: { constructor: 'Function<Headers>', append: 'Function<append>', delete: 'Function<delete>', get: 'Function<get>', has: 'Function<has>', set: 'Function<set>', getSetCookie: 'Function<getSetCookie>', keys: 'Function<keys>', values: 'Function<values>', entries: 'Function<entries>', forEach: 'Function<forEach>' }, body: { constructor: 'Function<ReadableStream>', locked: true, cancel: 'Function<cancel>', getReader: 'Function<getReader>', pipeThrough: 'Function<pipeThrough>', pipeTo: 'Function<pipeTo>', tee: 'Function<tee>', values: 'Function<values>' }, bodyUsed: true, clone: 'Function<clone>', blob: 'Function<blob>', arrayBuffer: 'Function<arrayBuffer>', text: 'Function<text>', json: 'Function<json>', formData: 'Function<formData>', bytes: 'Function<bytes>' }, responseBody: { error: 'Invalid API Key.' }, requestBody: undefined }
|
tests (ubuntu-latest, lts/*)
Process completed with exit code 1.
|