error
fun error(message: String, status: Int = 400, code: String? = null, field: String? = null, hint: String? = null): DebugResponse
An enveloped error response. The body is the uniform error envelope JSON {"error":<type>,"message":...,"code":?,"field":?,"hint":?}, where <type> follows from status: bad_request (400), unauthorized (401), forbidden (403), not_found (404), method_not_allowed (405), conflict (409), payload_too_large (413), unprocessable_entity (422), too_many_requests (429), internal_error (500), unavailable (503), timeout (504), and error for any other status. Optional code, field, and hint keys are omitted when null. All string values are escaped via escapeForJson.