error

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTypeInvalidRequest is returned when the request is invalid
	ErrTypeInvalidRequest         = "InvalidRequest"
	ErrTypeNICoObjectNotFound     = "NICoObjectNotFound"
	ErrTypeNICoUnimplemented      = "NICoUnimplemented"
	ErrTypeNICoUnavailable        = "NICoUnavailable"
	ErrTypeNICoDenied             = "NICoDenied"
	ErrTypeNICoAlreadyExists      = "NICoAlreadyExists"
	ErrTypeNICoFailedPrecondition = "NICoFailedPrecondition"
	ErrTypeNICoInvalidArgument    = "NICoInvalidArgument"

	// Legacy Carbide error type names. Retained so a newer REST can still
	// recognise errors emitted by an older site-workflow version that has
	// not yet been upgraded. Remove once the rollout window has closed.
	ErrTypeCarbideObjectNotFound     = "CarbideObjectNotFound"
	ErrTypeCarbideUnimplemented      = "CarbideUnimplemented"
	ErrTypeCarbideUnavailable        = "CarbideUnavailable"
	ErrTypeCarbideDenied             = "CarbideDenied"
	ErrTypeCarbideAlreadyExists      = "CarbideAlreadyExists"
	ErrTypeCarbideFailedPrecondition = "CarbideFailedPrecondition"
	ErrTypeCarbideInvalidArgument    = "CarbideInvalidArgument"
)

Functions

func FailedPreconditionErrTypes

func FailedPreconditionErrTypes() []string

FailedPreconditionErrTypes returns the error types treated as "failed precondition" from a Site Agent gRPC call. Both NICo and legacy Carbide names are listed so that REST can recognise errors from older site-workflow deployments. Remove the Carbide entry once the rollout window has closed.

func ObjectNotFoundErrTypes

func ObjectNotFoundErrTypes() []string

ObjectNotFoundErrTypes returns the error types treated as "object not found" from a Site Agent gRPC call. Both NICo and legacy Carbide names are listed so that REST can recognise errors from older site-workflow deployments. Remove the Carbide entry once the rollout window has closed.

func UnimplementedOrDeniedErrTypes

func UnimplementedOrDeniedErrTypes() []string

UnimplementedOrDeniedErrTypes returns the error types treated as "unimplemented or restricted" from a Site Agent gRPC call. Both NICo and legacy Carbide names are listed so that REST can recognise errors from older site-workflow deployments. Remove the Carbide entries once the rollout window has closed.

func WrapErr

func WrapErr(err error) error

WrapError accepts an error and checks if it can be converted to a gRPC status.

If the error can be converted and the status code matches a set of specific codes, it will be "wrapped" in a Temporal NewNonRetryableApplicationError.

Otherwise, it returns the original error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL