Skip to content

Throw Error — Reference

Reference · Advanced · Server Connect

Raise an exception that stops normal execution or is handled by Try/Catch.

Raise an exception that stops normal execution or is handled by Try/Catch.

  • An open Server Connect action. Runtime differences below refer to the installed Node.js and PHP implementations.

Raise an exception that stops normal execution or is handled by Try/Catch.

Setting Meaning
MessageThe error message to raise. It is required. Use a diagnostic message for internal handling and a controlled client-facing response rather than exposing secrets or raw provider errors.

Add Throw Error with Message Test failure inside a Try block. Read $_ERROR in Catch and return a controlled failure result. Remove the Throw Error and confirm that the success path resumes.

Throw Error is not the same as setting an HTTP status on a successful response. The installed PHP core method throws the configured message directly, while Node.js parses the required string; use a literal message for portable behavior.

Use the Server Connect guides when you need the surrounding project, data-loading or form procedure.

You can configure Throw Error deliberately and verify the result and failure behavior described in this reference.