forked from anthropics/anthropic-sdk-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared.ts
More file actions
85 lines (62 loc) · 1.38 KB
/
shared.ts
File metadata and controls
85 lines (62 loc) · 1.38 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export interface APIErrorObject {
message: string;
type: 'api_error';
}
export interface AuthenticationError {
message: string;
type: 'authentication_error';
}
export interface BillingError {
message: string;
type: 'billing_error';
}
export type ErrorObject =
| InvalidRequestError
| AuthenticationError
| BillingError
| PermissionError
| NotFoundError
| RateLimitError
| GatewayTimeoutError
| APIErrorObject
| OverloadedError;
export interface ErrorResponse {
error: ErrorObject;
request_id: string | null;
type: 'error';
}
export type ErrorType =
| 'invalid_request_error'
| 'authentication_error'
| 'permission_error'
| 'not_found_error'
| 'rate_limit_error'
| 'timeout_error'
| 'overloaded_error'
| 'api_error'
| 'billing_error';
export interface GatewayTimeoutError {
message: string;
type: 'timeout_error';
}
export interface InvalidRequestError {
message: string;
type: 'invalid_request_error';
}
export interface NotFoundError {
message: string;
type: 'not_found_error';
}
export interface OverloadedError {
message: string;
type: 'overloaded_error';
}
export interface PermissionError {
message: string;
type: 'permission_error';
}
export interface RateLimitError {
message: string;
type: 'rate_limit_error';
}