@foundry-ai/api-errors
Version:
Common errors that can be thrown and caught reliably across services
12 lines (11 loc) • 452 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const baseError_1 = require("./baseError");
class AuthenticationError extends baseError_1.BaseError {
constructor(message = 'Unauthorized', status = 401) {
super(message, status, 'authentication_error');
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
}
}
exports.AuthenticationError = AuthenticationError;