On This Page

SdkDefect

Class in Errors · JavaScript & TypeScript

An unexpected fault thrown or rejected by the default API instead of returned as a typed error result

Client creation throws synchronously, while asynchronous operations reject. This includes expected failures or cancellation combined with an unexpected cleanup fault. Effect reports an expected failure that occurs together with a fault as a fault too, so its entry has kind Defect and holds the expected SDK error. The first fault the application raised or that is not an expected SDK error, such as a cleanup fault, is the standard cause property and names the message and code. Reasons list every failure, fault and interruption entry. A fault from an application callback, such as a default keepTyping task, is an ApplicationError with origin application. A throw while the SDK reads caller-supplied options or input, such as from a property getter or a caller AbortSignal listener method, keeps the thrown value as the cause with origin application. Either application origin sets code application.defect instead of sdk.defect. A fault in SDK work around those reads, such as building a command registry or a client logger, keeps origin sdk. The native entry point uses Effect causes rather than wrapping them in this exception

class SdkDefect extends FluxerlyErrorclass SdkDefect
  extends FluxerlyError

Constructor#

new SdkDefect(
    operation?: Operation,
    reasons?: readonly DefectReason[]
): SdkDefectnew SdkDefect(
  operation?: Operation,
  reasons?: readonly DefectReason[]
): SdkDefect

Parameters

operation optional

Public call during which the fault was observed, not proof that a server mutation was rolled back

Operation
reasons optional

Cause entries, which can include both the primary failure and cleanup faults

readonly DefectReason[]

Properties#

_tag#

Discriminator for an unexpected fault in the default API

readonly _tag: "SdkDefect"

operation#

Public call during which the fault was observed, not proof that a server mutation was rolled back

readonly operation: Operation

reasons#

Cause entries, which can include both the primary failure and cleanup faults

readonly reasons: readonly DefectReason[]

Inherited#

Inherited from FluxerlyError: code, details, hint, toJSON