{"record":{"id":"68fc26d17715230d","repo":"temporalio/temporal","slug":"failed-to-mark-operation-error-as-wrapper-error","errorCode":null,"errorMessage":"failed to mark operation error as wrapper error: %w","messagePattern":"failed to mark operation error as wrapper error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/nexus/nexusrpc/client.go","lineNumber":369,"sourceCode":"\n\t\twireErr, err := c.failureConverter.FailureToError(failure)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// For compatibility with older servers.\n\t\tif _, ok := wireErr.(*nexus.OperationError); !ok {\n\t\t\tstate, err := getUnsuccessfulStateFromHeader(response, body)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\topErr := &nexus.OperationError{\n\t\t\t\tState:   state,\n\t\t\t\tMessage: \"nexus operation completed unsuccessfully\",\n\t\t\t\tCause:   wireErr,\n\t\t\t}\n\t\t\tif err := MarkAsWrapperError(c.failureConverter, opErr); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to mark operation error as wrapper error: %w\", err)\n\t\t\t}\n\t\t\twireErr = opErr\n\t\t}\n\n\t\treturn nil, wireErr\n\tdefault:\n\t\treturn nil, c.bestEffortHandlerErrorFromResponse(response, body)\n\t}\n}\n\n// NewOperationHandle gets a handle to an asynchronous operation by name and token.\n// Does not incur a trip to the server.\n// Fails if provided an empty operation or token.\nfunc (c *HTTPClient) NewOperationHandle(operation string, token string) (*OperationHandle[*nexus.LazyValue], error) {\n\tvar es []error\n\tif operation == \"\" {\n\t\tes = append(es, errEmptyOperationName)\n\t}","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/nexus/nexusrpc/client.go#L351-L387","documentation":"Error \"failed to mark operation error as wrapper error: %w\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at common/nexus/nexusrpc/client.go:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}