first commit

This commit is contained in:
2026-06-04 12:09:45 -03:00
commit ac20adb79d
33 changed files with 250575 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import type { ClarizenErrorBody } from "./types.js";
export class ClarizenApiError extends Error {
readonly errorCode: string;
readonly referenceId?: string;
readonly status: number;
constructor(status: number, body: ClarizenErrorBody) {
super(body.message);
this.name = "ClarizenApiError";
this.status = status;
this.errorCode = body.errorCode;
this.referenceId = body.referenceId;
}
isSessionTimeout(): boolean {
return this.errorCode === "SessionTimeout";
}
}