InvergeDocs
.NETAPI reference

Exceptions

Exceptions in the .NET SDK.

SymbolKindSummary
NexusApiExceptionclassA non-success response from the API.
NexusAuthenticationExceptionclass401 — the API key is missing, malformed, or revoked.
NexusBillingSuspendedExceptionclass402 — the organisation's data plane is suspended for unpaid invoices.
NexusConfigurationExceptionclassThe SDK was configured wrongly: no API key, a malformed origin, and so on.
NexusExceptionclassBase class for every failure the SDK raises, so one catch contains it.
NexusNotFoundExceptionclass404 — no such resource in this environment.
NexusPermissionDeniedExceptionclass403 — the key is valid but not allowed to do this.
NexusRateLimitExceptionclass429 — too many requests.
NexusServerExceptionclass5xx — the API failed.
NexusTransportExceptionclassA network-level failure: DNS, refused connection, TLS, or a timeout.
NexusValidationExceptionclass400 or 422 — the request body failed server-side validation.

NexusApiException

class
class Inverge.Nexus.NexusApiException

A non-success response from the API.

Nexus answers failures with {"error":{"code","message","details"}}. Those three land in Code, Message and Details. Prefer matching on Code over the message: codes are part of the contract, messages are not.

NexusApiException

constructor
new NexusApiException(string message, int status, string? code = null, JsonNode? details = null, string? method = null, string? path = null, string? responseBody = null)

Creates the exception.

Parameters

Prop

Type

Code

property
string? Code { get; }

The machine-readable error code, e.g. validation_failed.

Details

property
JsonNode? Details { get; }

Structured detail the server attached, when any.

Method

property
string? Method { get; }

The HTTP method of the failed request.

Path

property
string? Path { get; }

The path of the failed request.

ResponseBody

property
string? ResponseBody { get; }

The raw response body, truncated.

Status

property
int Status { get; }

The HTTP status code.

NexusAuthenticationException

class
class Inverge.Nexus.NexusAuthenticationException

401 — the API key is missing, malformed, or revoked.

NexusAuthenticationException

constructor
new NexusAuthenticationException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

NexusBillingSuspendedException

class
class Inverge.Nexus.NexusBillingSuspendedException

402 — the organisation's data plane is suspended for unpaid invoices.

Every /partner/* endpoint answers this while an organisation has invoices past due beyond the grace period; the control plane and payment callbacks stay open. Retrying cannot help, so the SDK never does: catch this distinctly from an authentication failure and surface it to whoever can pay the bill.

NexusBillingSuspendedException

constructor
new NexusBillingSuspendedException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

NexusConfigurationException

class
class Inverge.Nexus.NexusConfigurationException

The SDK was configured wrongly: no API key, a malformed origin, and so on.

NexusConfigurationException

constructor
new NexusConfigurationException(string message)

Creates the exception.

Parameters

Prop

Type

NexusConfigurationException

constructor
new NexusConfigurationException(string message, Exception? innerException)

Creates the exception with an underlying cause.

Parameters

Prop

Type

NexusException

class
class Inverge.Nexus.NexusException

Base class for every failure the SDK raises, so one catch contains it.

NexusException

constructor
new NexusException(string message)

Creates the exception.

Parameters

Prop

Type

NexusException

constructor
new NexusException(string message, Exception? innerException)

Creates the exception with an underlying cause.

Parameters

Prop

Type

NexusNotFoundException

class
class Inverge.Nexus.NexusNotFoundException

404 — no such resource in this environment.

NexusNotFoundException

constructor
new NexusNotFoundException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

NexusPermissionDeniedException

class
class Inverge.Nexus.NexusPermissionDeniedException

403 — the key is valid but not allowed to do this.

NexusPermissionDeniedException

constructor
new NexusPermissionDeniedException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

NexusRateLimitException

class
class Inverge.Nexus.NexusRateLimitException

429 — too many requests.

NexusRateLimitException

constructor
new NexusRateLimitException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody, TimeSpan? retryAfter)

Creates the exception.

Parameters

Prop

Type

RetryAfter

property
TimeSpan? RetryAfter { get; }

How long the server asked us to wait, when it said.

NexusServerException

class
class Inverge.Nexus.NexusServerException

5xx — the API failed. Idempotent calls are safe to repeat.

NexusServerException

constructor
new NexusServerException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

NexusTransportException

class
class Inverge.Nexus.NexusTransportException

A network-level failure: DNS, refused connection, TLS, or a timeout. The original exception is in InnerException.

NexusTransportException

constructor
new NexusTransportException(string message, Exception? innerException = null)

Creates the exception.

Parameters

Prop

Type

NexusValidationException

class
class Inverge.Nexus.NexusValidationException

400 or 422 — the request body failed server-side validation.

NexusValidationException

constructor
new NexusValidationException(string message, int status, string? code, JsonNode? details, string? method, string? path, string? responseBody)

Creates the exception.

Parameters

Prop

Type

On this page