UNPKG

@smooai/utils

Version:

A collection of shared utilities and tools used across SmooAI projects. This package provides common functionality to standardize and simplify development across all SmooAI repositories.

18 lines (17 loc) 473 B
import { getReasonPhrase } from "http-status-codes"; //#region src/api/ApiError.ts var ApiError = class ApiError extends Error { status; statusText; constructor(status, message, statusText) { super(message); this.status = status; this.statusText = statusText; } static throw(status, message, statusText) { throw new ApiError(status, message, statusText || getReasonPhrase(status)); } }; //#endregion export { ApiError }; //# sourceMappingURL=ApiError.mjs.map