277
opErr, ok := completionErr.(*nexus.OperationError)
278
if !ok {
279
>
// Backwards compatibility: wrap non-OperationError errors in an OperationError with the appropriate state.
completion.go
280
>
completion.Error = &nexus.OperationError{
281
>
Message: "nexus operation completed unsuccessfully",
282
>
State: completion.State,
283
>
Cause: completionErr,
284
>
}
285
>
if err := MarkAsWrapperError(h.FailureConverter, completion.Error); err != nil {
286
h.WriteFailure(writer, request, nexus.NewHandlerErrorf(nexus.HandlerErrorTypeBadRequest, "failed to decode Failure from request body"))
287
return