fix(rivetkit/next-js): fix request handler#4001
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
PR Review: fix(rivetkit/next-js): fix request handlerSummaryThis PR refactors the Next.js request handler in RivetKit, improving code organization, error handling, and development experience. The changes include better request handling, improved file watching for hot reloading, and a new dev environment script. Code Quality & Best Practices✅ Strengths
|
| err: stringifyError(err), | ||
| }); | ||
| clearInterval(watchIntervalId); | ||
| return await fetch(new Request(newUrl, request)); |
There was a problem hiding this comment.
The fallback fetch call does not include the mergedController.signal. This means the fallback request cannot be aborted via the merged signal, causing inconsistent abort behavior between the primary and fallback code paths. The watchIntervalId is cleared but the fallback fetch may continue indefinitely.
return await fetch(new Request(newUrl, request), {
signal: mergedController.signal,
});| return await fetch(new Request(newUrl, request)); | |
| return await fetch(new Request(newUrl, request), { | |
| signal: mergedController.signal, | |
| }); |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
0f56f4a to
f710245
Compare
f710245 to
ce43ed9
Compare
| import { stringifyError } from "rivetkit/utils"; | ||
| import { logger } from "./log"; |
There was a problem hiding this comment.
Import statements need to be sorted according to Biome linter rules. Built-in modules like 'path' should come first, followed by external packages, then local imports. Reorder to: import { existsSync, join, statSync } from 'path'; import { Registry } from 'rivetkit/registry'; import { stringifyError } from 'rivetkit/utils'; import { logger } from './log';
Spotted by Graphite Agent (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
Merge activity
|

No description provided.