API Clients

We provide a .NET API client.

For other programming languages, we suggest to generate an API client using the .

.NET API Client

Handling errors

Our API libraries raise exceptions for many reasons, such as an invalid parameter, authentication errors, and network unavailability.

The client in general throws exceptions of type ApiException for calls that reach the cloud. For some status codes an inner class is returned containing additional data, e.g. a more specific ErrorCode that won’t change over time:

ApiException<HttpStatus403Forbidden>

ApiException<HttpStatus409Conflict>

The Swagger API documentation shows which HTTP status codes are to be expected for each route.

We recommend writing code that gracefully handles all possible API exceptions, including general .NET exceptions.

Retry Policies

The client library has built-in support for Retry Policies, to enable the default retry behavior for the client library, simply set the “UsePollyPolicy” to “true”.

You can also define your own custom retry policy by using “Polly.Extensions.Http.HttpPolicyExtensions” and setting a “CustomAsyncPolicy” on the Noah API Client.