Skip to content

bug(web): contact and demo forms refuse long non-Latin messages they accept, showing only "Something went wrong. Try again." #4677

Closed

Description

@yannickmonney

Summary

The website's contact and request-demo forms promise "Keep your message to 2,000 characters or fewer." (forms.validation.messageTooLong), and their shared schema accepts up to 2,000 characters. The submit endpoint, however, refuses any request body over 4,096 bytes. Non-Latin scripts need 2–3 bytes per character in UTF-8, so messages inside the promised limit are refused:

Message script Request body for a 2,000-character message Longest message accepted
English 2,175 bytes, accepted 2,000 characters
Russian, Greek, Arabic 4,175 bytes, refused with 413 1,960 characters
Japanese, Chinese 6,175 bytes, refused with 413 1,307 characters

How the figures were computed: the contact form, with a typical name, email and company, using the exact JSON body that lib/forms/submit-client.ts:13–16 sends. The request-demo body carries a few more fields, so it is slightly larger. Real German text stays well under the cap: a 2,000-character sample is 2,841 bytes.

What the visitor sees: only forms.errors.generic, "Something went wrong. Try again." In de: "Etwas ist schiefgelaufen. Versuch es erneut." In fr: "Quelque chose s’est mal passé. Réessaie."

  • lib/forms/submit-errors.ts:18–23 maps every status other than 429 and 5xx to the generic message.
  • Retrying sends the same body and fails again.
  • No field error appears, and nothing tells the visitor to shorten the message. The contact or demo request is lost unless they guess.

Reproduction

Derived from source; not run live, because the local stack is blocked by the missing heavy-phase reservation.

  1. Open /contact or /request-demo and fill in the required fields.
  2. Write a 1,400-character message in Japanese, or a 1,980-character message in Russian.
  3. Tick the privacy box, wait 3 seconds and submit.
  4. The request is refused: it answers 413 {"ok":false,"error":"Payload too large"}. The form shows "Something went wrong. Try again." Every retry gives the same result.

Source

At main e836391d5:

  • The byte cap: services/web/server.ts:46 sets MAX_BODY_BYTES = 4 * 1024.
    • :111–115 refuses a Content-Length above it with 413.
    • :119–123 repeats the check on the UTF-16 length.
  • The character limits: services/web/lib/forms/schemas.ts allows 2,000 characters each for name (:17), company (:21), email (:32) and message (:24–25 for request-demo, :93–98 for contact).
  • The fallback to the generic message: lib/forms/submit-errors.ts:18–23, shown by app/components/blocks/form-card.tsx:252–266.
  • A related edge with the same mapping: the server re-checks the 3-second minimum against its own clock, but uses the browser's startedAt (server.ts:147–151). A visitor whose clock runs ahead of the server gets 400 Submitted too quickly, which is also shown as the generic message.

Expected

  • Either the server accepts every body the schema allows, or the client enforces the same byte budget:
    • Server: the worst case is about 4 × 2,000 characters × 3 bytes plus JSON overhead, roughly 24 KiB.
    • Client: enforce the byte budget and show validation.messageTooLong with the real limit.
  • A 413 maps to a message that names the cause (the message is too long) instead of "Try again".
  • Regression tests:
    • a server test showing a schema-maximum message in a 3-byte script is accepted, or a schema test for the byte budget;
    • a submit-errors test for 413.

Triage

  • Severity: low. It's an edge case, but the visitor's request is lost without explanation, for anyone writing at length in a non-Latin script.
  • Owner: the website maintainers.
  • Review A cells: web.contact and web.request-demo, UX-CLARITY and REL-MANUAL. Found from static evidence by Review A (TALE-358) at the 2026-10-10 00:15 Europe/Zurich occurrence. Not observed live.

Activity

  1. added
    agent-ready
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 30, 2026
    00bd3c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions