You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: platform/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,9 +121,9 @@ if res.api_key_details is not None:
121
121
<!-- Start Retries [retries] -->
122
122
## Retries
123
123
124
-
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
124
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
125
125
126
-
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
126
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
127
127
```python
128
128
import codatplatform
129
129
from codatplatform.models import shared
@@ -147,7 +147,7 @@ if res.api_key_details is not None:
147
147
pass
148
148
```
149
149
150
-
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
150
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
151
151
```python
152
152
import codatplatform
153
153
from codatplatform.models import shared
@@ -186,7 +186,7 @@ Handling errors in this SDK should largely match your expectations. All operati
186
186
187
187
```python
188
188
import codatplatform
189
-
from codatplatform.models import shared
189
+
from codatplatform.models importerrors, shared
190
190
191
191
s = codatplatform.CodatPlatform(
192
192
security=shared.Security(
@@ -202,10 +202,10 @@ res = None
202
202
try:
203
203
res = s.settings.create_api_key(req)
204
204
except errors.ErrorMessage as e:
205
-
print(e) # handle exception
205
+
# handle exception
206
206
raise(e)
207
207
except errors.SDKError as e:
208
-
print(e) # handle exception
208
+
# handle exception
209
209
raise(e)
210
210
211
211
if res.api_key_details isnotNone:
@@ -279,7 +279,7 @@ if res.api_key_details is not None:
279
279
<!-- Start Custom HTTP Client [http-client] -->
280
280
## Custom HTTP Client
281
281
282
-
The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
282
+
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
283
283
284
284
For example, you could specify a header for every request that this sdk makes as follows:
|`can_be_retried`|*Optional[str]*|:heavy_minus_sign:|`True` if the error occurred transiently and can be retried. |
11
-
|`correlation_id`|*Optional[str]*|:heavy_minus_sign:| Unique identifier used to propagate to all downstream services and determine the source of the error. |
12
-
|`detailed_error_code`|*Optional[int]*|:heavy_minus_sign:| Machine readable error code used to automate processes based on the code returned. |
13
-
|`error`|*Optional[str]*|:heavy_minus_sign:| A brief description of the error. |
14
-
|`service`|*Optional[str]*|:heavy_minus_sign:| Codat's service the returned the error. |
15
-
|`status_code`|*Optional[int]*|:heavy_minus_sign:| The HTTP status code returned by the error. |
|`can_be_retried`|*Optional[str]*|:heavy_minus_sign:|`True` if the error occurred transiently and can be retried. |
11
+
|`correlation_id`|*Optional[str]*|:heavy_minus_sign:| Unique identifier used to propagate to all downstream services and determine the source of the error. |
12
+
|`detailed_error_code`|*Optional[int]*|:heavy_minus_sign:| Machine readable error code used to automate processes based on the code returned. |
13
+
|`error`|*Optional[str]*|:heavy_minus_sign:| A brief description of the error. |
14
+
|`service`|*Optional[str]*|:heavy_minus_sign:| Codat's service the returned the error. |
15
+
|`status_code`|*Optional[int]*|:heavy_minus_sign:| The HTTP status code returned by the error. |
16
+
|`validation`|[Optional[shared.ErrorValidation]](../../models/shared/errorvalidation.md)|:heavy_minus_sign:| A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. |
0 commit comments