Skip to content

fix: correct timeout error page status code#41810

Open
lupingblaine wants to merge 1 commit into
appsmithorg:releasefrom
lupingblaine:fix/41544-misleading-timeout-error-code
Open

fix: correct timeout error page status code#41810
lupingblaine wants to merge 1 commit into
appsmithorg:releasefrom
lupingblaine:fix/41544-misleading-timeout-error-code

Conversation

@lupingblaine
Copy link
Copy Markdown

@lupingblaine lupingblaine commented May 14, 2026

Summary

This PR fixes the misleading timeout error page status code.

The current timeout page displays 504, which suggests a gateway timeout. However, this error is triggered by a client-side request timeout, so 408 is more appropriate.

Changes

  • Changed timeout error code from 504 to 408
  • Updated timeout page title
  • Updated timeout page description

Fixes #41544

Summary by CodeRabbit

  • Bug Fixes
    • Updated the server timeout error message and corrected the associated HTTP status code to provide clearer guidance when server requests take too long to complete.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Walkthrough

Error message constants for server timeout scenarios are updated. The HTTP status code changes from 504 to 408, and the user-facing title and description strings are revised with more generic timeout language instead of previous Appsmith-server-specific wording.

Changes

Error Message Updates

Layer / File(s) Summary
Server timeout error constants
app/client/src/ce/constants/messages.ts
PAGE_SERVER_TIMEOUT_ERROR_CODE() now returns 408 instead of 504. The error page title changed to "Request timed out" and description to "The server is taking too long to respond. Please retry after some time".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A timeout's dressed in brand new clothes,
From 504 to 408 it goes,
The message kinder, clearer too—
"Retry soon!" it pleads to you. ⏱️

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR changes only error message constants but is linked to issue #41544 about signup visibility in login UI, which are unrelated concerns. Verify the correct issue is linked. If #41544 is not the intended fix, update the issue reference to the correct timeout-related issue.
Out of Scope Changes check ⚠️ Warning The PR modifies timeout error page messages, but the linked issue #41544 addresses signup visibility in the login UI—these are unrelated changes. Clarify the relationship between the timeout error fix and issue #41544, or link to the correct issue that documents the timeout error status code problem.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: correcting the timeout error page status code from 504 to 408.
Description check ✅ Passed The description covers the change summary and references the linked issue, but lacks some recommended sections from the template like automation tags and DevRel/Marketing communication checkbox.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/client/src/ce/constants/messages.ts`:
- Around line 492-494: The message for the timeout is semantically inconsistent
with the 408 status; either make the text client-side or change the status
code—update PAGE_SERVER_TIMEOUT_DESCRIPTION (and the adjacent "Request timed
out" constant) so that if you keep HTTP 408 the description reads a
client-focused message like "Your request timed out. Please check your
connection and try again," or if you want to describe a slow server keep the
current wording but change the HTTP status to a server-side timeout (e.g., 504)
wherever the 408 status is defined and used.
- Line 490: The exported constant PAGE_SERVER_TIMEOUT_ERROR_CODE
(PAGE_SERVER_TIMEOUT_ERROR_CODE = () => "408") has semantics mismatch with its
message; update it to return "504" to match the message "The server is taking
too long to respond" OR keep "408" and revise the associated user-facing message
to a client-timeout phrasing like "Your request took too long. Please try
again."; also review the PR reference to issue `#41544` and correct or remove that
issue ID if it is unrelated to timeout handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2d67e0b7-d017-4ef5-bc1a-457a1568bf11

📥 Commits

Reviewing files that changed from the base of the PR and between d75495a and 97f1840.

📒 Files selected for processing (1)
  • app/client/src/ce/constants/messages.ts

export const PAGE_NOT_FOUND_TITLE = () => "404";
export const PAGE_NOT_FOUND = () => "Page not found";
export const PAGE_SERVER_TIMEOUT_ERROR_CODE = () => "504";
export const PAGE_SERVER_TIMEOUT_ERROR_CODE = () => "408";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for usage context of PAGE_SERVER_TIMEOUT_ERROR_CODE to understand the timeout scenario
rg -n -C5 'PAGE_SERVER_TIMEOUT_ERROR_CODE' --type=ts --type=tsx

Repository: appsmithorg/appsmith

Length of output: 92


🏁 Script executed:

#!/bin/bash
# Search for usage context of PAGE_SERVER_TIMEOUT_ERROR_CODE
rg -n -C5 'PAGE_SERVER_TIMEOUT_ERROR_CODE' --type=ts

Repository: appsmithorg/appsmith

Length of output: 2858


🏁 Script executed:

#!/bin/bash
# Search for any references to issue `#41544` or timeout error handling in the codebase
rg -n 'PAGE_SERVER_TIMEOUT|timeout.*error|408|504' app/client/src/ce/constants/ --type=ts -A2 -B2

Repository: appsmithorg/appsmith

Length of output: 854


🏁 Script executed:

#!/bin/bash
# Look for the actual error page or handler that uses this constant
fd -e ts -e tsx . app/client/src/ | xargs rg -l 'PAGE_SERVER_TIMEOUT_ERROR_CODE|PAGE_SERVER_TIMEOUT_TITLE|PAGE_SERVER_TIMEOUT_DESCRIPTION' | head -20

Repository: appsmithorg/appsmith

Length of output: 161


The error code and message have conflicting semantics.

HTTP 408 (Request Timeout) indicates the client failed to send a request within the timeout window, while the message "The server is taking too long to respond" describes server-side behavior, which aligns with HTTP 504 (Gateway Timeout).

Either:

  • Change code to "504" to match the message semantics, or
  • Reword the message to reflect client timeout semantics (e.g., "Your request took too long. Please try again.")

Additionally, verify that issue #41544 referenced in the PR ("Allowing only invited users to register is not working") is the correct issue—it appears unrelated to timeout error codes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/client/src/ce/constants/messages.ts` at line 490, The exported constant
PAGE_SERVER_TIMEOUT_ERROR_CODE (PAGE_SERVER_TIMEOUT_ERROR_CODE = () => "408")
has semantics mismatch with its message; update it to return "504" to match the
message "The server is taking too long to respond" OR keep "408" and revise the
associated user-facing message to a client-timeout phrasing like "Your request
took too long. Please try again."; also review the PR reference to issue `#41544`
and correct or remove that issue ID if it is unrelated to timeout handling.

Comment on lines +492 to +494
"Request timed out";
export const PAGE_SERVER_TIMEOUT_DESCRIPTION = () =>
`Please retry after some time`;
`The server is taking too long to respond. Please retry after some time`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Semantic inconsistency between error code and error message.

The error code 408 (Request Timeout) indicates a client-side timeout, but the description "The server is taking too long to respond" describes a server-side timeout scenario. This creates confusion:

  • If this is truly a client-side timeout (client didn't send request in time) → Use 408, but update the message to something like: "Your request timed out. Please check your connection and try again."

  • If this is a server-side timeout (server/API taking too long to respond to a completed request) → The message is correct, but revert the status code to 504 or use 503.

The message should semantically align with the chosen status code to avoid user confusion and aid in troubleshooting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/client/src/ce/constants/messages.ts` around lines 492 - 494, The message
for the timeout is semantically inconsistent with the 408 status; either make
the text client-side or change the status code—update
PAGE_SERVER_TIMEOUT_DESCRIPTION (and the adjacent "Request timed out" constant)
so that if you keep HTTP 408 the description reads a client-focused message like
"Your request timed out. Please check your connection and try again," or if you
want to describe a slow server keep the current wording but change the HTTP
status to a server-side timeout (e.g., 504) wherever the 408 status is defined
and used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Allowing only invited users to register is not working

1 participant