Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,11 @@ export const BACK_TO_HOMEPAGE = () => "Go back to homepage";
// error pages
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.

export const PAGE_SERVER_TIMEOUT_TITLE = () =>
"Appsmith server is taking too long to respond";
"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`;
Comment on lines +492 to +494
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.

export const PAGE_CLIENT_ERROR_TITLE = () => "Whoops something went wrong!";
export const PAGE_CLIENT_ERROR_DESCRIPTION = () =>
"This is embarrassing, please contact Appsmith support for help";
Expand Down