Skip to content

Bug: tale.dev contact form returns 503 — WEB_DISCORD_WEBHOOK_URL unset in the production web deployment #2389

Closed

Description

@yannickmonney

Problem

Submitting the contact form on the website fails ("Failed to load resource: the server responded with a status of 503").

Verified against production 2026-07-02: POST https://tale.dev/api/forms/submit with an empty JSON body returns HTTP 503 {"ok":false,"error":"Service not configured"}. The handler checks configuration before validation, so a 503 (rather than a 400 validation error) proves the env var is missing in prod.

Current behavior

  • services/web/server.ts:25 — DISCORD_WEBHOOK_URL = process.env.WEB_DISCORD_WEBHOOK_URL ?? ''; at lines 54-60 handleFormSubmit logs [forms] WEB_DISCORD_WEBHOOK_URL is not set and returns 503 Service not configured when empty.
  • Client: services/web/lib/forms/submit-client.ts → /api/forms/submit; payload → Discord embed (lib/forms/discord-embeds.ts).

Proposed change

  • Ops: set WEB_DISCORD_WEBHOOK_URL in the production web deployment (and document it in the deploy config / .env.example for the web service).
  • Guard: fail loudly at deploy time (startup warning is logged today but nothing surfaces it) — e.g. a health/readiness detail or a required-env check in the deploy tooling.
  • UX: the form should show a clear "something went wrong on our side" state for 5xx (distinct from validation errors) so users aren't left with a silent console error.

Acceptance criteria

  • POST /api/forms/submit on production accepts a valid submission (delivers to Discord).
  • Missing required web env vars are caught by deploy/health checks, not by users.
  • Form displays a friendly failure state on 5xx.
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions