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