Issue Bug Closed

#102204Wrong HTTP response status code after form submit

Patrick Crausaz 10/19/23, 10:18 updated 08/11/26, 08:46

Description

When submitting a form (package: typo3/cms-form) with an invalid email address, e.g. a domain that doesn’t exist, we get the error

> 503
> Expected response code “250/251/252” but got code “550”, with message “550-The mail server could not deliver mail to test@invalidhost.abc. The 550-account or domain may not exist, they may be blacklisted, or missing the 550 proper dns entries.”.

The message on the screen states a 503 error. However, the actual response is a 500 error.

Reviews 2

Files 1

History 611

  1. Stefan Bürk commented <span data-processor="relativetime" data-value="2023-10-20T10:50:49+00:00" > 10/20/23, 10:50 </span>

    503 is a HTTP Status Code. The 550 error code in the error message is a Mailserver error code,
    which is a completly other story. And not a valid HTTP Status code.

    503 means, that an aunhandled application error is thrown.

    What are your settings – are you in debug mode and what are your error/exception level configurations ?
    If you switch to more production like, is there than another status code displayed or the normal form ?

    Getting the smtp error message looks like you are more in a debug mode context.

  2. Patrick Crausaz commented <span data-processor="relativetime" data-value="2023-10-21T06:36:21+00:00" > 10/21/23, 06:36 </span>

    I wasn’t referring to the Mailserver error code, only the HTTP Status code.
    I tested with debug and production mode.
    In both debug mode and production mode, the error is thrown with code 500, but display code 503 (As you can see in the attached screenshot)

  3. Josua Vogel commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-05-28T20:50:08+00:00" > 05/28/26, 20:50 </span>

    Applied in changeset commit:fdc8d31ba3ea34b30e5a0d16229d88d5b323ded8.