Memco

Class MemcoPreconditionFailedError

The service refused because the caller's state does not allow the call.

Billing, account standing, terms, a resource in the wrong state — something outside the request has to change, so neither a retry nor a different argument gets past it. detail is the service's own account of what that is.

Three cases the service names with a structured reason are modelled as subclasses: a sunset, as MemcoSunsetError, and the two refusals to place a user in a network, MemcoUserAlreadyAssignedNetworkError and MemcoExternalUserNeedsCustomerNetworkError. An instanceof chain testing this class first never reaches them, and comparing name against 'MemcoPreconditionFailedError' never matches them at all. Test for them explicitly, either way.

Hierarchy (View Summary)

Index
code: Status

The gRPC status code, as @grpc/grpc-js's numeric status enum.

codeName: string

The status code's name, such as UNAUTHENTICATED.

detail: string

The service's own description of the failure, without the code prefix.

debugErrorString: string | undefined

gRPC's internal diagnostic string, when the call carried one.

metadata: Readonly<Record<string, string>>

The detail the service attached to the refusal, key to value, such as the network a user is already in. Empty when it attached none. Frozen, and the service's to extend: a key this SDK does not name is still here.

On this page