Skip to content

Commit

Permalink
Issue with server component
Browse files Browse the repository at this point in the history
  • Loading branch information
balegas committed Aug 30, 2024
1 parent c8eb408 commit 64f3703
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/typescript-client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,16 @@ export class ShapeStream {
let attempt = 0

// eslint-disable-next-line no-constant-condition -- we're retrying with a lag until we get a non-500 response or the abort signal is triggered
while (true) {
while (true && (!signal || !signal.aborted)) {
try {
const result = await this.fetchClient(url.toString(), { signal })
// The request are being cached and I can't disable it,
// so I'm adding a random query parameter to avoid it.
// This needs to be fixed, but all stuff I tried didn't work.
url.searchParams.set(`_`, Math.random().toString())
console.log(`fetching ${url.toString()}`)
const result = await this.fetchClient(url.toString(), {
signal,
} as any)

Check failure on line 395 in packages/typescript-client/src/client.ts

View workflow job for this annotation

GitHub Actions / Check packages/typescript-client

Unexpected any. Specify a different type
if (result.ok) return result
else throw await FetchError.fromResponse(result, url.toString())
} catch (e) {
Expand Down

0 comments on commit 64f3703

Please sign in to comment.