Server Errors
A backend can return a non-2xx response with a JSON message.
{ "message": "The model is warming up. Try again in a few seconds."}Use hooks.onSubmitError for host notifications.
import { predictionTransport } from "./prediction-transport";
mountForm(container, { transport: predictionTransport, schema, hooks: { onSubmitError({ error }) { console.error("Prediction failed", error); }, },});Keep validation errors close to fields when they are known before submit. Use server errors for backend availability, authorization, malformed responses, and model failures.