Class LaravelUi5\Sdk\Action\ActionResponseSerializer

final

Encodes a sealed {@see ActionResponse} (and a technical failure) into the wire envelopes of §6 — a pure function of its input, so the whole contract is table-testable without an HTTP request.

  • Success (200) — { status: "Success", message, data, messages, sideEffects }.
  • Business failure (422) — { status: "Error", message, errors: {}, messages }, byte-shape-identical to what {@see \LaravelUi5\Sdk\Http\Requests\AbstractSdkFormRequest} emits for a validation failure, so the client parses both the same way. errors is an empty object (business failures target no fields); the rich detail rides messages.
  • Technical failure (500) — the §9 debug-gated envelope: full exception + trace when APP_DEBUG, else a friendly { message, correlationId } with the stacktrace logged (never on the wire).

The $debug flag is passed in (not read from config()) so this stays pure.

Methods