-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.js
More file actions
35 lines (26 loc) · 1002 Bytes
/
exceptions.js
File metadata and controls
35 lines (26 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
class AuthError extends Error {
constructor(m) { super(m); this.name = 'AuthError'; }
}
class APIError extends Error {
constructor(m) { super(m); this.name = 'APIError'; }
}
class ImageGenerationError extends APIError {
constructor(m) { super(m); this.name = 'ImageGenerationError'; }
}
class GeminiError extends Error {
constructor(m) { super(m); this.name = 'GeminiError'; }
}
class TimeoutError extends GeminiError {
constructor(m) { super(m); this.name = 'TimeoutError'; }
}
class UsageLimitExceeded extends GeminiError {
constructor(m) { super(m); this.name = 'UsageLimitExceeded'; }
}
class ModelInvalid extends GeminiError {
constructor(m) { super(m); this.name = 'ModelInvalid'; }
}
class TemporarilyBlocked extends GeminiError {
constructor(m) { super(m); this.name = 'TemporarilyBlocked'; }
}
module.exports = { AuthError, APIError, ImageGenerationError, GeminiError, TimeoutError, UsageLimitExceeded, ModelInvalid, TemporarilyBlocked };