Class Failure

Represents a failure.

Export

Failure

Constructors

  • Creates an instance of Failure.

    Parameters

    • code: string
    • description: string
    • type: string

    Returns Failure

    Memberof

    Failure

Properties

code: string

Gets the unique failure code

Memberof

Failure

description: string

Gets the failure description

Memberof

Failure

type: string

Gets the failure type

Memberof

Failure

Methods

  • Creates a new instance of Failure with type FailureTypes.Conflict from a code and description.

    Parameters

    • Optional code: string = 'General.Conflict'
    • Optional description: string = 'A conflict has occurred.'

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure with type FailureTypes.Default from a code and description.

    Parameters

    • Optional code: string = 'General.Failure'
    • Optional description: string = 'A failure has occurred.'

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure from a custom code, description, and type.

    Parameters

    • code: string
    • description: string
    • type: string

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure with type FailureTypes.NotFound from a code and description.

    Parameters

    • Optional code: string = 'General.NotFound'
    • Optional description: string = "A 'Not Found' failure has occurred."

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure with type FailureTypes.Unauthorized from a code and description.

    Parameters

    • Optional code: string = 'General.Unauthorized'
    • Optional description: string = "An 'Unauthorized' failure has occurred."

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure with type FailureTypes.Unexpected from a code and description.

    Parameters

    • Optional code: string = 'General.Unexpected'
    • Optional description: string = 'An unexpected failure has occurred.'

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

  • Creates a new instance of Failure with type FailureTypes.Conflict from a code and description.

    Parameters

    • Optional code: string = 'General.Validation'
    • Optional description: string = 'A validation failure has occurred.'

    Returns Failure

    {Failure}

    Static

    Memberof

    Failure

Generated using TypeDoc