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
@@ -186,13 +187,24 @@ if res.image_response is not None:
186
187
<!-- Start Error Handling [errors] -->
187
188
## Error Handling
188
189
189
-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
190
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
190
191
191
-
| Error Object | Status Code | Content Type |
192
+
By default, an API error will raise a errors.SDKError exception, which has the following properties:
|`.raw_response`|*httpx.Response*| The raw HTTP response |
199
+
|`.body`|*str*| The response content |
200
+
201
+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `text_to_image_async` method may raise the following exceptions:
0 commit comments