summaryrefslogtreecommitdiff
path: root/classes/SignalAPIError.ts
diff options
context:
space:
mode:
Diffstat (limited to 'classes/SignalAPIError.ts')
-rw-r--r--classes/SignalAPIError.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/SignalAPIError.ts b/classes/SignalAPIError.ts
index fc14b47..4352235 100644
--- a/classes/SignalAPIError.ts
+++ b/classes/SignalAPIError.ts
@@ -1,6 +1,17 @@
+/**
+ * An error in the Signal API
+ */
export class SignalAPIError extends Error {
+ /**
+ * Internal error code for this error or category of errors
+ */
public code: number;
+ /**
+ * @param message - The error message
+ * @param code - The internal error code for this error or category of errors
+ * @internal
+ */
constructor(message: string, code?: number) {
const errorCodes = {
'-1': "USER_ERROR",