@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.
20 lines (19 loc) • 612 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../chunk-CoPdw6nB.cjs");
let http_status_codes = require("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 || (0, http_status_codes.getReasonPhrase)(status));
}
};
//#endregion
exports.ApiError = ApiError;
//# sourceMappingURL=ApiError.cjs.map