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
Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
4
+
5
+
## How to Report Issues
6
+
7
+
If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
8
+
9
+
- A clear and descriptive title
10
+
- Steps to reproduce the issue
11
+
- Expected and actual behavior
12
+
- Any relevant logs, screenshots, or error messages
13
+
- Information about your environment (e.g., operating system, software versions)
14
+
- For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
15
+
16
+
## Issue Triage and Upstream Fixes
17
+
18
+
We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
19
+
20
+
## Contact
21
+
22
+
If you have any questions or need further assistance, please feel free to reach out by opening an issue.
@@ -173,67 +153,85 @@ var res = await sdk.Auth.GetAccessAsync(req);
173
153
<!-- Start Error Handling [errors] -->
174
154
## Error Handling
175
155
176
-
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
177
-
178
-
By default, an API error will raise a `SpeakeasySDK.Models.Errors.SDKException` exception, which has the following properties:
156
+
[`SDKBaseException`](./src/SpeakeasySDK/Models/Errors/SDKBaseException.cs) is the base exception class for all HTTP error responses. It has the following properties:
When custom error responses are specified for an operation, the SDK may also throw 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 `CreateRemoteSourceAsync` method throws the following exceptions:
Some exceptions in this SDK include an additional `Payload` field, which will contain deserialized custom error data when present. Possible exceptions are listed in the [Error Classes](#error-classes) section.
// Check ex.InnerException for Network connectivity errors
217
+
}
236
218
```
219
+
220
+
### Error Classes
221
+
222
+
**Primary exceptions:**
223
+
*[`SDKBaseException`](./src/SpeakeasySDK/Models/Errors/SDKBaseException.cs): The base class for HTTP error responses.
224
+
*[`Error`](./src/SpeakeasySDK/Models/Errors/Error.cs): The `Status` type defines a logical error model. *
225
+
226
+
<details><summary>Less common exceptions (2)</summary>
227
+
228
+
*[`System.Net.Http.HttpRequestException`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httprequestexception): Network connectivity error. For more details about the underlying cause, inspect the `ex.InnerException`.
229
+
230
+
* Inheriting from [`SDKBaseException`](./src/SpeakeasySDK/Models/Errors/SDKBaseException.cs):
231
+
*[`ResponseValidationError`](./src/SpeakeasySDK/Models/Errors/ResponseValidationError.cs): Thrown when the response data could not be deserialized into the expected type.
232
+
</details>
233
+
234
+
\* Refer to the [relevant documentation](#available-resources-and-operations) to determine whether an exception applies to a specific operation.
237
235
<!-- End Error Handling [errors] -->
238
236
239
237
<!-- Start Server Selection [server] -->
@@ -243,34 +241,24 @@ catch (Exception ex)
243
241
244
242
You can override the default server globally by passing a server name to the `server: string` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
0 commit comments