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: NUGET.md
+36-55Lines changed: 36 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -24,44 +24,6 @@ var res = await sdk.Apis.GetApisAsync(req);
24
24
```
25
25
<!-- End SDK Example Usage [usage] -->
26
26
27
-
<!-- Start Global Parameters [global-parameters] -->
28
-
## Global Parameters
29
-
30
-
## Global Parameters
31
-
32
-
A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
33
-
34
-
For example, you can set `workspaceID` to `"<value>"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetWorkspace`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
35
-
36
-
37
-
### Available Globals
38
-
39
-
The following global parameter is available.
40
-
41
-
| Name | Type | Required | Description |
42
-
| ---- | ---- |:--------:| ----------- |
43
-
| workspaceID | string || The WorkspaceID parameter. |
@@ -127,12 +91,23 @@ var res = await sdk.Auth.GetWorkspaceAccessAsync(req);
127
91
<!-- Start Error Handling [errors] -->
128
92
## Error Handling
129
93
130
-
Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type.
94
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
95
+
96
+
By default, an API error will raise a `SpeakeasySDK.Models.Errors.SDKException` exception, which has the following properties:
|`RawResponse`|*HttpResponseMessage*| The raw HTTP response |
103
+
|`Body`|*string*| The response content |
104
+
105
+
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 `DeleteApiAsync` method throws the following exceptions:
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
203
184
```csharp
@@ -210,8 +191,8 @@ var sdk = new SDK(security: new Security() {
0 commit comments