misc: added more error handling

This commit is contained in:
Sheen Capadngan
2024-11-08 21:43:25 +08:00
parent bf09fa33fa
commit 8a14914bc3
5 changed files with 74 additions and 14 deletions
+12
View File
@@ -133,3 +133,15 @@ export class ScimRequestError extends Error {
this.status = status;
}
}
export class OidcAuthError extends Error {
name: string;
error: unknown;
constructor({ name, error, message }: { message?: string; name?: string; error?: unknown }) {
super(message || "Something went wrong");
this.name = name || "OidcAuthError";
this.error = error;
}
}