temporalio/temporal · error

failed to mark operation error as wrapper error: %w

Error message

failed to mark operation error as wrapper error: %w

What it means

Error "failed to mark operation error as wrapper error: %w" thrown in temporalio/temporal.

Source

Thrown at common/nexus/nexusrpc/client.go:369

		wireErr, err := c.failureConverter.FailureToError(failure)
		if err != nil {
			return nil, err
		}

		// For compatibility with older servers.
		if _, ok := wireErr.(*nexus.OperationError); !ok {
			state, err := getUnsuccessfulStateFromHeader(response, body)
			if err != nil {
				return nil, err
			}
			opErr := &nexus.OperationError{
				State:   state,
				Message: "nexus operation completed unsuccessfully",
				Cause:   wireErr,
			}
			if err := MarkAsWrapperError(c.failureConverter, opErr); err != nil {
				return nil, fmt.Errorf("failed to mark operation error as wrapper error: %w", err)
			}
			wireErr = opErr
		}

		return nil, wireErr
	default:
		return nil, c.bestEffortHandlerErrorFromResponse(response, body)
	}
}

// NewOperationHandle gets a handle to an asynchronous operation by name and token.
// Does not incur a trip to the server.
// Fails if provided an empty operation or token.
func (c *HTTPClient) NewOperationHandle(operation string, token string) (*OperationHandle[*nexus.LazyValue], error) {
	var es []error
	if operation == "" {
		es = append(es, errEmptyOperationName)
	}

View on GitHub (pinned to bde624efd1)

When it happens

Trigger: Thrown at common/nexus/nexusrpc/client.go:369 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/68fc26d17715230d. Report an issue: GitHub.