Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: don't log server errors for aborted requests #5602

Merged
merged 2 commits into from
Mar 10, 2023

Conversation

brophdawg11
Copy link
Contributor

Since aborted requests is an ecpedted flow, we should not log the error from the router (i.e., new Error("queryRoute() call aborted")). We had this check for some flows but not all.

@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2023

🦋 Changeset detected

Latest commit: 71f1a8f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/node Patch
@remix-run/react Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
create-remix Patch
@remix-run/css-bundle Patch
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/testing Patch
@remix-run/vercel Patch
@remix-run/serve Patch
remix Patch
@remix-run/eslint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -383,10 +389,6 @@ async function errorBoundaryError(error: Error, status: number) {
}

function returnLastResortErrorResponse(error: any, serverMode?: ServerMode) {
if (serverMode !== ServerMode.Test) {
console.error(error);
}
Copy link
Contributor Author

@brophdawg11 brophdawg11 Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the log to a utility that does the checking and lifted to the 2 places we call returnLastResortErrorResponse

@brophdawg11 brophdawg11 merged commit e37115b into dev Mar 10, 2023
@brophdawg11 brophdawg11 deleted the brophdawg11/dont-log-aborted-requests branch March 10, 2023 14:33
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Mar 10, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-7d96a22-20230311 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting release This issue has been fixed and will be released soon CLA Signed package:server-runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants