Concept Flow - Response helpers (json, error)
Request received
Process data
If success
yes→Use json() helper
Send JSON response
If error
yes→Use error() helper
Send error response
This flow shows how a SvelteKit endpoint uses json() to send data on success, or error() to send error responses.