OUT-4109 | Handle SWR mutate rejections instead of letting them reach Sentry - #1439
Merged
Merged
Conversation
…1397) deleteLabel passed `id: currentLabel?.id` straight into label.delete, so when findFirst matched nothing Prisma got `{ id: undefined }` and threw PrismaClientValidationError, failing the whole delete transaction. Return early instead.
* OUT-4093 | Remove the localStorage→localForage assignee migration
… Sentry Two rejection paths per component: the optimistic mutate() was never awaited, so its rejection escaped the surrounding try/catch, and debounceMutate() is fire-and-forget. Both surface as unhandled rejections when fetcher() throws. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Y4tF84tzJW7Bo1DehsDX22
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR handles SWR mutation failures locally so expected fetch errors no longer surface as unhandled promise rejections.
Confidence Score: 5/5The PR appears safe to merge, with no changed-code defect identified in the new rejection handling. The awaited mutations now reach their existing rollback and cleanup handlers, while the debounced mutation catches only consume promises that no caller previously observed. Important Files Changed
Reviews (1): Last reviewed commit: "OUT-4109 | Handle SWR mutate rejections ..." | Re-trigger Greptile |
SandipBajracharya
force-pushed
the
main
branch
from
August 26, 2026 13:11
1bc04dd to
51d44fd
Compare
…-4109-unhandled-swr-mutate-rejections
Contributor
|
Deployment failed for project tasks-app with the following error: Learn More: https://vercel.link/multiple-function-regions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Error: An error occurred while fetching the data.issrc/utils/fetcher.tsthrowing inside an SWRmutate()whose promise nothing handles, so it lands in Sentry viaonunhandledrejectionrather than thetry/catchthat's already sitting right there. OUT-4109 — same root cause as OUT-4107.Replaces #1437.
What to look at:
mutate(...)(now awaited inside the existingtry/catch) and the fire-and-forgetdebounceMutate(cacheKey)revalidation (now.catch-ed).handleSubTaskCreation/handleSubtemplateCreationhad to becomeasyncfor theawait; both are passed as(payload) => voidprops, whichPromise<void>satisfies.Verified:
yarn tsc,yarn lint:check(0 errors),yarn prettier:check. Not verified: no manual run against a failing API — this only changes who catches the rejection, not the optimistic rollback behaviour.🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4tF84tzJW7Bo1DehsDX22