apacuana-sdk-web
Version:
Apacuana SDK for Web
18 lines • 597 B
JavaScript
export const ApacuanaWebErrorCode = {
NOT_INITIALIZED: "NOT_INITIALIZED",
UNKNOWN_ERROR: "UNKNOWN_ERROR",
ENCRYPTION_FAILED: "ENCRYPTION_FAILED",
VALIDATION_ERROR: "VALIDATION_ERROR",
NOT_FOUND: "NOT_FOUND",
PARSE_ERROR: "PARSE_ERROR",
};
export class ApacuanaWebError extends Error {
constructor(message, code = ApacuanaWebErrorCode.UNKNOWN_ERROR, statusCode = 500) {
super(message);
this.name = "ApacuanaWebError";
this.code = code;
this.statusCode = statusCode;
this.success = false;
}
}
//# sourceMappingURL=errors.js.map