@@ -45,6 +45,10 @@ class RateLimitExceeded(IntercomError):
45
45
pass
46
46
47
47
48
+ class ResourceNotRestorable (IntercomError ):
49
+ pass
50
+
51
+
48
52
class MultipleMatchingUsersError (IntercomError ):
49
53
pass
50
54
@@ -57,6 +61,10 @@ class TokenUnauthorizedError(IntercomError):
57
61
pass
58
62
59
63
64
+ class TokenNotFoundError (IntercomError ):
65
+ pass
66
+
67
+
60
68
error_codes = {
61
69
'unauthorized' : AuthenticationError ,
62
70
'forbidden' : AuthenticationError ,
@@ -65,10 +73,19 @@ class TokenUnauthorizedError(IntercomError):
65
73
'missing_parameter' : BadRequestError ,
66
74
'parameter_invalid' : BadRequestError ,
67
75
'parameter_not_found' : BadRequestError ,
76
+ 'client_error' : BadRequestError ,
77
+ 'type_mismatch' : BadRequestError ,
68
78
'not_found' : ResourceNotFound ,
79
+ 'admin_not_found' : ResourceNotFound ,
80
+ 'not_restorable' : ResourceNotRestorable ,
69
81
'rate_limit_exceeded' : RateLimitExceeded ,
70
82
'service_unavailable' : ServiceUnavailableError ,
83
+ 'server_error' : ServiceUnavailableError ,
71
84
'conflict' : MultipleMatchingUsersError ,
72
85
'unique_user_constraint' : MultipleMatchingUsersError ,
73
- 'token_unauthorized' : TokenUnauthorizedError
86
+ 'token_unauthorized' : TokenUnauthorizedError ,
87
+ 'token_not_found' : TokenNotFoundError ,
88
+ 'token_revoked' : TokenNotFoundError ,
89
+ 'token_blocked' : TokenNotFoundError ,
90
+ 'token_expired' : TokenNotFoundError
74
91
}
0 commit comments