BadRequest class is used to standardize the structure of a "Bad Request" error response, including the response body, headers, status, and status text.ts
import { BadRequest } from "@arkyn/server";
string): A descriptive message explaining the cause of the error.any, optional): Additional information about the cause of the error.toResponse()BadRequest instance into a Response object with a JSON body. This method ensures that the response has the appropriate headers, status, and status text.ResponsetoJson()BadRequest instance into a Response object using the Response.json method. This method is an alternative to toResponse for generating JSON error responses.Response