File size: 1,100 Bytes
e816bb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
class AuthError(Exception):
    """

    Exception for authentication errors caused by invalid credentials/cookies.

    """

    pass


class APIError(Exception):
    """

    Exception for package-level errors which need to be fixed in the future development (e.g. validation errors).

    """

    pass


class ImageGenerationError(APIError):
    """

    Exception for generated image parsing errors.

    """

    pass


class GeminiError(Exception):
    """

    Exception for errors returned from Gemini server which are not handled by the package.

    """

    pass


class TimeoutError(GeminiError):
    """

    Exception for request timeouts.

    """

    pass


class UsageLimitExceeded(GeminiError):
    """

    Exception for model usage limit exceeded errors.

    """

    pass


class ModelInvalid(GeminiError):
    """

    Exception for invalid model header string errors.

    """

    pass


class TemporarilyBlocked(GeminiError):
    """

    Exception for 429 Too Many Requests when IP is temporarily blocked.

    """

    pass