import { ApiHandler } from "../Types/ApiHandler"; /** * @description A middleware that executes before a route handler. Catches thrown errors executes a JSON response matching OrderCloud's format. * @param {Function} routeHandler A function to handle the request and response. * @returns {Function} A function to handle the request and response. */ export declare function withOcErrorHandler(routeHandler: ApiHandler): ApiHandler; /** * @description Converts an error object to a JSON response matching OrderCloud's format * @param {Error} err An error object. * @param {Function} res A response object */ export declare function respondWithOcFormatError(err: any, res: any): void;