diff --git a/common/runtime/model.go b/common/runtime/model.go index 7a3dec6173..bb9d380736 100644 --- a/common/runtime/model.go +++ b/common/runtime/model.go @@ -100,16 +100,16 @@ type OperationsData struct { } type Operation struct { - State string `json:"state"` - Type OperationType `json:"type,omitempty"` - Description string `json:"description"` - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - OperationID string `json:"operationID"` - OrchestrationID string `json:"orchestrationID,omitempty"` - FinishedStages []string `json:"finishedStages"` - ExecutedButNotCompletedSteps []string `json:"executedButNotCompletedSteps,omitempty"` - Error kebError.LastError `json:"error,omitempty"` + State string `json:"state"` + Type OperationType `json:"type,omitempty"` + Description string `json:"description"` + CreatedAt time.Time `json:"createdAt"` + UpdatedAt time.Time `json:"updatedAt"` + OperationID string `json:"operationID"` + OrchestrationID string `json:"orchestrationID,omitempty"` + FinishedStages []string `json:"finishedStages"` + ExecutedButNotCompletedSteps []string `json:"executedButNotCompletedSteps,omitempty"` + Error *kebError.LastError `json:"error,omitempty"` } type RuntimesPage struct { diff --git a/internal/error/errors.go b/internal/error/errors.go index 7cd25730ed..b5e8b61e5e 100644 --- a/internal/error/errors.go +++ b/internal/error/errors.go @@ -94,7 +94,7 @@ func TimeoutError(msg, step string) LastError { Message: msg, Reason: KEBTimeOutCode, Component: KEBDependency, - Step: step, + Step: step, } } diff --git a/internal/runtime/converter.go b/internal/runtime/converter.go index 654fdb0a26..a2f788f606 100644 --- a/internal/runtime/converter.go +++ b/internal/runtime/converter.go @@ -68,7 +68,7 @@ func (c *converter) applyOperation(source *internal.Operation, target *pkg.Opera target.FinishedStages = source.FinishedStages target.ExecutedButNotCompletedSteps = source.ExcutedButNotCompleted if !reflect.DeepEqual(source.LastError, kebError.LastError{}) { - target.Error = source.LastError + target.Error = &source.LastError } } }