Private
constructorReadonly
codeGets the unique failure code
Failure
Readonly
descriptionGets the failure description
Failure
Readonly
typeGets the failure type
Failure
Static
conflictCreates a new instance of Failure with type FailureTypes.Conflict from a code and description.
Optional
code: string = 'General.Conflict'Optional
description: string = 'A conflict has occurred.'{Failure}
Failure
Static
createCreates a new instance of Failure with type FailureTypes.Default from a code and description.
Optional
code: string = 'General.Failure'Optional
description: string = 'A failure has occurred.'{Failure}
Failure
Static
customStatic
fromStatic
notCreates a new instance of Failure with type FailureTypes.NotFound from a code and description.
Optional
code: string = 'General.NotFound'Optional
description: string = "A 'Not Found' failure has occurred."{Failure}
Failure
Static
unauthorizedCreates a new instance of Failure with type FailureTypes.Unauthorized from a code and description.
Optional
code: string = 'General.Unauthorized'Optional
description: string = "An 'Unauthorized' failure has occurred."{Failure}
Failure
Static
unexpectedCreates a new instance of Failure with type FailureTypes.Unexpected from a code and description.
Optional
code: string = 'General.Unexpected'Optional
description: string = 'An unexpected failure has occurred.'{Failure}
Failure
Static
validationCreates a new instance of Failure with type FailureTypes.Conflict from a code and description.
Optional
code: string = 'General.Validation'Optional
description: string = 'A validation failure has occurred.'{Failure}
Failure
Generated using TypeDoc
Represents a failure.
Export
Failure