errors
AbstractNylasApiError
Bases: Exception
Base class for all Nylas API errors.
Attributes:
Name | Type | Description |
---|---|---|
request_id |
str
|
The unique identifier of the request. |
status_code |
int
|
The HTTP status code of the error response. |
Source code in nylas/models/errors.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
__init__(message, request_id=None, status_code=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_id |
Optional[str]
|
The unique identifier of the request. |
None
|
status_code |
Optional[int]
|
The HTTP status code of the error response. |
None
|
message |
str
|
The error message. |
required |
Source code in nylas/models/errors.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
AbstractNylasSdkError
Bases: Exception
Base class for all Nylas SDK errors.
Source code in nylas/models/errors.py
33 34 35 36 37 38 |
|
NylasApiError
Bases: AbstractNylasApiError
Class representation of a general Nylas API error.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
Error type. |
provider_error |
Optional[dict]
|
Provider Error. |
Source code in nylas/models/errors.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
__init__(api_error, status_code=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_error |
NylasApiErrorResponse
|
The error details from the API. |
required |
status_code |
Optional[int]
|
The HTTP status code of the error response. |
None
|
Source code in nylas/models/errors.py
101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
NylasApiErrorResponse
dataclass
Interface representing the error response from the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
request_id |
str
|
The unique identifier of the request. |
error |
NylasApiErrorResponseData
|
The error data. |
Source code in nylas/models/errors.py
58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
NylasApiErrorResponseData
dataclass
Interface representing the error data within the response object.
Attributes:
Name | Type | Description |
---|---|---|
type |
str
|
The type of error. |
message |
str
|
The error message. |
provider_error |
Optional[dict]
|
The provider error if there is one. |
Source code in nylas/models/errors.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
NylasOAuthError
Bases: AbstractNylasApiError
Class representation of an OAuth error returned by the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
error |
str
|
Error type. |
error_code |
int
|
Error code used for referencing the docs, logs, and data stream. |
error_description |
str
|
Human readable error description. |
error_uri |
str
|
URL to the related documentation and troubleshooting regarding this error. |
Source code in nylas/models/errors.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
__init__(oauth_error, status_code=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
oauth_error |
NylasOAuthErrorResponse
|
The error details from the API. |
required |
status_code |
Optional[int]
|
The HTTP status code of the error response. |
None
|
Source code in nylas/models/errors.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
NylasOAuthErrorResponse
dataclass
Interface representing an OAuth error returned by the Nylas API.
Attributes:
Name | Type | Description |
---|---|---|
error |
str
|
Error type. |
error_code |
int
|
Error code used for referencing the docs, logs, and data stream. |
error_description |
str
|
Human readable error description. |
error_uri |
str
|
URL to the related documentation and troubleshooting regarding this error. |
Source code in nylas/models/errors.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
NylasSdkTimeoutError
Bases: AbstractNylasSdkError
Error thrown when the Nylas SDK times out before receiving a response from the server.
Attributes:
Name | Type | Description |
---|---|---|
url |
str
|
The URL that timed out. |
timeout |
int
|
The timeout value set in the Nylas SDK, in seconds. |
Source code in nylas/models/errors.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
__init__(url, timeout)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url |
str
|
The URL that timed out. |
required |
timeout |
int
|
The timeout value set in the Nylas SDK, in seconds. |
required |
Source code in nylas/models/errors.py
153 154 155 156 157 158 159 160 161 162 163 |
|