Skip to content

[Bug]: Client-side timeout error page displays misleading "504" HTTP status code #41541

@m-k8s

Description

@m-k8s

Is there an existing issue for this?

  • I have searched the existing issues

Description

When a client-side request timeout occurs (Axios ECONNABORTED), the error page
displays 504 as the error code. This is misleading because:

  • No HTTP 504 response was received - the timeout is purely client-side
  • Debugging confusion - administrators search for 504 errors in server/proxy
    logs but find none
  • Misdiagnosis - users assume the proxy or backend returned a 504 Gateway
    Timeout when the issue is purely client-side
  • False root cause analysis - teams may incorrectly tune server/proxy
    timeouts when the actual issue is client-side timeout configuration

Expected behavior:
The error page should either display no HTTP status code (since none was
received) or use a textual label like "Request Timeout" instead of a fake
numeric HTTP status code.

Steps To Reproduce

  1. Create slow-proxy.py (a minimal HTTP proxy that introduces a 25-second delay on specific API calls):
#!/usr/bin/env python3

import http.server, socketserver, urllib.request, urllib.error, time

PORT = 3001
TARGET = "http://localhost:80"
DELAY = 25
PATH = "/api/v1/actions/view?applicationId"

class Proxy(http.server.BaseHTTPRequestHandler):
    def do_GET(self): self._proxy()
    def do_POST(self): self._proxy()
    def do_PUT(self): self._proxy()
    def do_DELETE(self): self._proxy()
    def log_message(self, format, *args): pass

    def _proxy(self):
        if PATH in self.path:
            print(f"SLOW {DELAY}s: {self.path[:60]}")
            time.sleep(DELAY)

        body = self.rfile.read(int(self.headers.get("Content-Length", 0))) or None
        headers = {k: v for k, v in self.headers.items() if k.lower() not in {"host", "connection"}}

        try:
            req = urllib.request.Request(f"{TARGET}{self.path}", body, headers, method=self.command)
            with urllib.request.urlopen(req, timeout=60) as r:
                self.send_response(r.status)
                [self.send_header(k, v) for k, v in r.headers.items() if k.lower() != "transfer-encoding"]
                self.end_headers()
                self.wfile.write(r.read())
        except urllib.error.HTTPError as e:
            self.send_response(e.code)
            self.end_headers()
            self.wfile.write(e.read())
        except BrokenPipeError:
            pass  # Client closed connection (timeout) - expected behavior

print(f"Go to http://localhost:{PORT}/app/your-app-slug to see the 504 error page after {DELAY}s.")
socketserver.ThreadingTCPServer(("", PORT), Proxy).serve_forever()
  1. Start the proxy: python3 slow-proxy.py
  2. Navigate to http://localhost:3001/app/your-app-slug in a browser
  3. Wait ~20 seconds for the Appsmith error page to appear
  4. Observe: The error page displays "504" status code
  5. Verify no actual 504 occurred:
    • Network tab: request was aborted client-side (no HTTP response)
    • Server/proxy logs: no 504 error logged

Public Sample App

No response

Environment

Production

Severity

Low (Cosmetic UI issues)

Issue video log

No response

Version

v1.90

Metadata

Metadata

Labels

BugSomething isn't workingNeeds TriagingNeeds attention from maintainers to triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions