From 3303a5c7669ee1af339aa0aaf0f5aa08d04e191e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Cac=CC=A7ador?= Date: Fri, 7 Feb 2025 18:29:24 +0000 Subject: [PATCH 1/4] IWF-511: Update iwf-idl --- gen/iwfidl/.openapi-generator/FILES | 2 + gen/iwfidl/README.md | 1 + gen/iwfidl/api/openapi.yaml | 9 ++ gen/iwfidl/docs/IwfEvent.md | 26 +++++ gen/iwfidl/docs/IwfEventError.md | 82 ++++++++++++++ gen/iwfidl/model_iwf_event.go | 36 +++++++ gen/iwfidl/model_iwf_event_error.go | 160 ++++++++++++++++++++++++++++ iwf-idl | 2 +- 8 files changed, 317 insertions(+), 1 deletion(-) create mode 100644 gen/iwfidl/docs/IwfEventError.md create mode 100644 gen/iwfidl/model_iwf_event_error.go diff --git a/gen/iwfidl/.openapi-generator/FILES b/gen/iwfidl/.openapi-generator/FILES index bdb7f6f5..64dd4a4c 100644 --- a/gen/iwfidl/.openapi-generator/FILES +++ b/gen/iwfidl/.openapi-generator/FILES @@ -27,6 +27,7 @@ docs/InterStateChannelCommand.md docs/InterStateChannelPublishing.md docs/InterStateChannelResult.md docs/IwfEvent.md +docs/IwfEventError.md docs/KeyValue.md docs/PersistenceLoadingPolicy.md docs/PersistenceLoadingType.md @@ -112,6 +113,7 @@ model_inter_state_channel_command.go model_inter_state_channel_publishing.go model_inter_state_channel_result.go model_iwf_event.go +model_iwf_event_error.go model_key_value.go model_persistence_loading_policy.go model_persistence_loading_type.go diff --git a/gen/iwfidl/README.md b/gen/iwfidl/README.md index a5cdee03..d18c3f3f 100644 --- a/gen/iwfidl/README.md +++ b/gen/iwfidl/README.md @@ -122,6 +122,7 @@ Class | Method | HTTP request | Description - [InterStateChannelPublishing](docs/InterStateChannelPublishing.md) - [InterStateChannelResult](docs/InterStateChannelResult.md) - [IwfEvent](docs/IwfEvent.md) + - [IwfEventError](docs/IwfEventError.md) - [KeyValue](docs/KeyValue.md) - [PersistenceLoadingPolicy](docs/PersistenceLoadingPolicy.md) - [PersistenceLoadingType](docs/PersistenceLoadingType.md) diff --git a/gen/iwfidl/api/openapi.yaml b/gen/iwfidl/api/openapi.yaml index 45e2bbff..c033af7b 100644 --- a/gen/iwfidl/api/openapi.yaml +++ b/gen/iwfidl/api/openapi.yaml @@ -3373,6 +3373,8 @@ components: endTimestampInMs: format: int64 type: integer + error: + $ref: '#/components/schemas/IwfEvent_error' searchAttributes: items: $ref: '#/components/schemas/SearchAttribute' @@ -3383,3 +3385,10 @@ components: - workflowRunId - workflowType type: object + IwfEvent_error: + properties: + type: + type: string + details: + type: string + type: object diff --git a/gen/iwfidl/docs/IwfEvent.md b/gen/iwfidl/docs/IwfEvent.md index ae72bdf8..e4cbca18 100644 --- a/gen/iwfidl/docs/IwfEvent.md +++ b/gen/iwfidl/docs/IwfEvent.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **RpcName** | Pointer to **string** | | [optional] **StartTimestampInMs** | Pointer to **int64** | | [optional] **EndTimestampInMs** | Pointer to **int64** | | [optional] +**Error** | Pointer to [**IwfEventError**](IwfEventError.md) | | [optional] **SearchAttributes** | Pointer to [**[]SearchAttribute**](SearchAttribute.md) | | [optional] ## Methods @@ -239,6 +240,31 @@ SetEndTimestampInMs sets EndTimestampInMs field to given value. HasEndTimestampInMs returns a boolean if a field has been set. +### GetError + +`func (o *IwfEvent) GetError() IwfEventError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *IwfEvent) GetErrorOk() (*IwfEventError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *IwfEvent) SetError(v IwfEventError)` + +SetError sets Error field to given value. + +### HasError + +`func (o *IwfEvent) HasError() bool` + +HasError returns a boolean if a field has been set. + ### GetSearchAttributes `func (o *IwfEvent) GetSearchAttributes() []SearchAttribute` diff --git a/gen/iwfidl/docs/IwfEventError.md b/gen/iwfidl/docs/IwfEventError.md new file mode 100644 index 00000000..85903894 --- /dev/null +++ b/gen/iwfidl/docs/IwfEventError.md @@ -0,0 +1,82 @@ +# IwfEventError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] +**Details** | Pointer to **string** | | [optional] + +## Methods + +### NewIwfEventError + +`func NewIwfEventError() *IwfEventError` + +NewIwfEventError instantiates a new IwfEventError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIwfEventErrorWithDefaults + +`func NewIwfEventErrorWithDefaults() *IwfEventError` + +NewIwfEventErrorWithDefaults instantiates a new IwfEventError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *IwfEventError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *IwfEventError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *IwfEventError) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *IwfEventError) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDetails + +`func (o *IwfEventError) GetDetails() string` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *IwfEventError) GetDetailsOk() (*string, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *IwfEventError) SetDetails(v string)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *IwfEventError) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/gen/iwfidl/model_iwf_event.go b/gen/iwfidl/model_iwf_event.go index 93d71e26..8bd26048 100644 --- a/gen/iwfidl/model_iwf_event.go +++ b/gen/iwfidl/model_iwf_event.go @@ -28,6 +28,7 @@ type IwfEvent struct { RpcName *string `json:"rpcName,omitempty"` StartTimestampInMs *int64 `json:"startTimestampInMs,omitempty"` EndTimestampInMs *int64 `json:"endTimestampInMs,omitempty"` + Error *IwfEventError `json:"error,omitempty"` SearchAttributes []SearchAttribute `json:"searchAttributes,omitempty"` } @@ -308,6 +309,38 @@ func (o *IwfEvent) SetEndTimestampInMs(v int64) { o.EndTimestampInMs = &v } +// GetError returns the Error field value if set, zero value otherwise. +func (o *IwfEvent) GetError() IwfEventError { + if o == nil || IsNil(o.Error) { + var ret IwfEventError + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IwfEvent) GetErrorOk() (*IwfEventError, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *IwfEvent) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given IwfEventError and assigns it to the Error field. +func (o *IwfEvent) SetError(v IwfEventError) { + o.Error = &v +} + // GetSearchAttributes returns the SearchAttributes field value if set, zero value otherwise. func (o *IwfEvent) GetSearchAttributes() []SearchAttribute { if o == nil || IsNil(o.SearchAttributes) { @@ -369,6 +402,9 @@ func (o IwfEvent) ToMap() (map[string]interface{}, error) { if !IsNil(o.EndTimestampInMs) { toSerialize["endTimestampInMs"] = o.EndTimestampInMs } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } if !IsNil(o.SearchAttributes) { toSerialize["searchAttributes"] = o.SearchAttributes } diff --git a/gen/iwfidl/model_iwf_event_error.go b/gen/iwfidl/model_iwf_event_error.go new file mode 100644 index 00000000..3e418aa9 --- /dev/null +++ b/gen/iwfidl/model_iwf_event_error.go @@ -0,0 +1,160 @@ +/* +Workflow APIs + +This APIs for iwf SDKs to operate workflows + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package iwfidl + +import ( + "encoding/json" +) + +// checks if the IwfEventError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IwfEventError{} + +// IwfEventError struct for IwfEventError +type IwfEventError struct { + Type *string `json:"type,omitempty"` + Details *string `json:"details,omitempty"` +} + +// NewIwfEventError instantiates a new IwfEventError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIwfEventError() *IwfEventError { + this := IwfEventError{} + return &this +} + +// NewIwfEventErrorWithDefaults instantiates a new IwfEventError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIwfEventErrorWithDefaults() *IwfEventError { + this := IwfEventError{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IwfEventError) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IwfEventError) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IwfEventError) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IwfEventError) SetType(v string) { + o.Type = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *IwfEventError) GetDetails() string { + if o == nil || IsNil(o.Details) { + var ret string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IwfEventError) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *IwfEventError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *IwfEventError) SetDetails(v string) { + o.Details = &v +} + +func (o IwfEventError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IwfEventError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + return toSerialize, nil +} + +type NullableIwfEventError struct { + value *IwfEventError + isSet bool +} + +func (v NullableIwfEventError) Get() *IwfEventError { + return v.value +} + +func (v *NullableIwfEventError) Set(val *IwfEventError) { + v.value = val + v.isSet = true +} + +func (v NullableIwfEventError) IsSet() bool { + return v.isSet +} + +func (v *NullableIwfEventError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIwfEventError(val *IwfEventError) *NullableIwfEventError { + return &NullableIwfEventError{value: val, isSet: true} +} + +func (v NullableIwfEventError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIwfEventError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/iwf-idl b/iwf-idl index 8e3930e5..8be448ca 160000 --- a/iwf-idl +++ b/iwf-idl @@ -1 +1 @@ -Subproject commit 8e3930e50c793a0455d7ca0babe079ec3921dd60 +Subproject commit 8be448ca42bfbd05e2d0e23b8eee6a3ee7ea27a6 From c5d920de55d0030d2fdd5aa0624e5229eeec30c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Cac=CC=A7ador?= Date: Mon, 10 Feb 2025 11:47:02 +0000 Subject: [PATCH 2/4] IWF-511: Events emitted contain error details when event is a FAIL even --- service/client/cadence/client.go | 10 +++++++ service/client/interfaces.go | 1 + service/client/temporal/client.go | 10 +++++++ service/interpreter/activityImpl.go | 45 ++++++++++++++++++++++++----- service/interpreter/workflowImpl.go | 18 ++++++++++++ 5 files changed, 76 insertions(+), 8 deletions(-) diff --git a/service/client/cadence/client.go b/service/client/cadence/client.go index 59effbfb..7501e7ef 100644 --- a/service/client/cadence/client.go +++ b/service/client/cadence/client.go @@ -89,6 +89,16 @@ func (t *cadenceClient) GetApplicationErrorDetails(err error, detailsPtr interfa return fmt.Errorf("not an application error. Critical code bug") } +func (t *cadenceClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { + errType := t.GetApplicationErrorTypeIfIsApplicationError(err) + var errDetails string + detailErr := t.GetApplicationErrorDetails(err, &errDetails) + if detailErr != nil { + errDetails = detailErr.Error() + } + return errType, errDetails +} + func NewCadenceClient( domain string, cClient client.Client, serviceClient workflowserviceclient.Interface, converter encoded.DataConverter, closeFunc func(), retryPolicy *config.QueryWorkflowFailedRetryPolicy, diff --git a/service/client/interfaces.go b/service/client/interfaces.go index 1b8bb9c2..7ce1926e 100644 --- a/service/client/interfaces.go +++ b/service/client/interfaces.go @@ -41,6 +41,7 @@ type UnifiedClient interface { type errorHandler interface { GetApplicationErrorTypeIfIsApplicationError(err error) string GetApplicationErrorDetails(err error, detailsPtr interface{}) error + GetApplicationErrorTypeAndDetails(err error) (string, string) IsWorkflowAlreadyStartedError(error) bool GetRunIdFromWorkflowAlreadyStartedError(error) (string, bool) IsNotFoundError(error) bool diff --git a/service/client/temporal/client.go b/service/client/temporal/client.go index e3bdb645..74d09c63 100644 --- a/service/client/temporal/client.go +++ b/service/client/temporal/client.go @@ -117,6 +117,16 @@ func (t *temporalClient) GetApplicationErrorDetails(err error, detailsPtr interf return fmt.Errorf("application error doesn't have details. Critical code bug") } +func (t *temporalClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { + errType := t.GetApplicationErrorTypeIfIsApplicationError(err) + var errDetails string + detailErr := t.GetApplicationErrorDetails(err, &errDetails) + if detailErr != nil { + errDetails = detailErr.Error() + } + return errType, errDetails +} + func (t *temporalClient) StartInterpreterWorkflow( ctx context.Context, options uclient.StartWorkflowOptions, args ...interface{}, ) (runId string, err error) { diff --git a/service/interpreter/activityImpl.go b/service/interpreter/activityImpl.go index a91b76e0..e8ecb79a 100644 --- a/service/interpreter/activityImpl.go +++ b/service/interpreter/activityImpl.go @@ -56,6 +56,11 @@ func StateApiWaitUntil( resp, httpResp, err := req.WorkflowStateStartRequest(input.Request).Execute() printDebugMsg(logger, err, iwfWorkerBaseUrl) if checkHttpError(err, httpResp) { + stateStartErr := composeHttpError( + activityInfo.IsLocalActivity, + provider, err, httpResp, string(iwfidl.STATE_API_FAIL_ERROR_TYPE)) + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(stateStartErr) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_WAIT_UNTIL_ATTEMPT_FAIL_EVENT, WorkflowType: input.Request.WorkflowType, @@ -64,13 +69,18 @@ func StateApiWaitUntil( StateId: ptr.Any(input.Request.WorkflowStateId), StateExecutionId: ptr.Any(input.Request.Context.GetStateExecutionId()), SearchAttributes: searchAttributes, + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) - return nil, composeHttpError( - activityInfo.IsLocalActivity, - provider, err, httpResp, string(iwfidl.STATE_API_FAIL_ERROR_TYPE)) + return nil, stateStartErr } if err := checkCommandRequestFromWaitUntilResponse(resp); err != nil { + stateStartErr := composeStartApiRespError(provider, err, resp) + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(stateStartErr) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_WAIT_UNTIL_ATTEMPT_FAIL_EVENT, WorkflowType: input.Request.WorkflowType, @@ -79,8 +89,12 @@ func StateApiWaitUntil( StateId: ptr.Any(input.Request.WorkflowStateId), StateExecutionId: ptr.Any(input.Request.Context.GetStateExecutionId()), SearchAttributes: searchAttributes, + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) - return nil, composeStartApiRespError(provider, err, resp) + return nil, stateStartErr } // Before returning successful results, check if it's local activity then compose some info for debug purpose @@ -146,6 +160,12 @@ func StateApiExecute( resp, httpResp, err := req.WorkflowStateDecideRequest(input.Request).Execute() printDebugMsg(logger, err, iwfWorkerBaseUrl) if checkHttpError(err, httpResp) { + stateApiExecuteErr := composeHttpError( + activityInfo.IsLocalActivity, + provider, err, httpResp, string(iwfidl.STATE_API_FAIL_ERROR_TYPE)) + + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(stateApiExecuteErr) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_EXECUTE_ATTEMPT_FAIL_EVENT, WorkflowType: input.Request.WorkflowType, @@ -154,13 +174,18 @@ func StateApiExecute( StateId: ptr.Any(input.Request.WorkflowStateId), StateExecutionId: input.Request.Context.StateExecutionId, SearchAttributes: searchAttributes, + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) - return nil, composeHttpError( - activityInfo.IsLocalActivity, - provider, err, httpResp, string(iwfidl.STATE_API_FAIL_ERROR_TYPE)) + return nil, stateApiExecuteErr } if err = checkStateDecisionFromResponse(resp); err != nil { + stateApiExecuteErr := composeExecuteApiRespError(provider, err, resp) + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(stateApiExecuteErr) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_EXECUTE_ATTEMPT_FAIL_EVENT, WorkflowType: input.Request.WorkflowType, @@ -169,8 +194,12 @@ func StateApiExecute( StateId: ptr.Any(input.Request.WorkflowStateId), StateExecutionId: input.Request.Context.StateExecutionId, SearchAttributes: searchAttributes, + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) - return nil, composeExecuteApiRespError(provider, err, resp) + return nil, stateApiExecuteErr } // Before returning successful results, check if it's local activity then compose some info for debug purpose diff --git a/service/interpreter/workflowImpl.go b/service/interpreter/workflowImpl.go index 033c3ba3..ddfcb0c3 100644 --- a/service/interpreter/workflowImpl.go +++ b/service/interpreter/workflowImpl.go @@ -44,12 +44,18 @@ func InterpreterImpl( SearchAttributes: sas, }) } else if provider.IsApplicationError(retErr) { + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(retErr) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.WORKFLOW_FAIL_EVENT, WorkflowType: input.IwfWorkflowType, WorkflowId: provider.GetWorkflowInfo(ctx).WorkflowExecution.ID, WorkflowRunId: provider.GetWorkflowInfo(ctx).WorkflowExecution.RunID, SearchAttributes: sas, + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) } } @@ -635,6 +641,8 @@ func processStateExecution( SearchAttributes: persistenceManager.GetAllSearchAttributes(), }) } else { + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(errStartApi) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_WAIT_UNTIL_EE_FAIL_EVENT, WorkflowType: basicInfo.IwfWorkflowType, @@ -643,6 +651,10 @@ func processStateExecution( StateId: ptr.Any(state.StateId), StateExecutionId: ptr.Any(stateExeId), SearchAttributes: persistenceManager.GetAllSearchAttributes(), + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) } } @@ -912,6 +924,8 @@ func invokeStateExecute( SearchAttributes: persistenceManager.GetAllSearchAttributes(), }) } else { + errType, errDetails := env.GetUnifiedClient().GetApplicationErrorTypeAndDetails(err) + event.Handle(iwfidl.IwfEvent{ EventType: iwfidl.STATE_EXECUTE_EE_FAIL_EVENT, WorkflowType: basicInfo.IwfWorkflowType, @@ -920,6 +934,10 @@ func invokeStateExecute( StateId: ptr.Any(state.StateId), StateExecutionId: ptr.Any(stateExeId), SearchAttributes: persistenceManager.GetAllSearchAttributes(), + Error: &iwfidl.IwfEventError{ + Type: &errType, + Details: &errDetails, + }, }) } } From 1de81beebfa572b9b694827ffbbb43db95820f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Cac=CC=A7ador?= Date: Tue, 11 Feb 2025 11:24:05 +0000 Subject: [PATCH 3/4] IWF-511: Split Error Details work to another ticket --- service/client/cadence/client.go | 8 ++------ service/client/temporal/client.go | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/service/client/cadence/client.go b/service/client/cadence/client.go index 7501e7ef..3c6f869b 100644 --- a/service/client/cadence/client.go +++ b/service/client/cadence/client.go @@ -91,12 +91,8 @@ func (t *cadenceClient) GetApplicationErrorDetails(err error, detailsPtr interfa func (t *cadenceClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { errType := t.GetApplicationErrorTypeIfIsApplicationError(err) - var errDetails string - detailErr := t.GetApplicationErrorDetails(err, &errDetails) - if detailErr != nil { - errDetails = detailErr.Error() - } - return errType, errDetails + // TODO: Error Details will be added under IWF-511 + return errType, "" } func NewCadenceClient( diff --git a/service/client/temporal/client.go b/service/client/temporal/client.go index 74d09c63..a2f4a3ed 100644 --- a/service/client/temporal/client.go +++ b/service/client/temporal/client.go @@ -119,12 +119,8 @@ func (t *temporalClient) GetApplicationErrorDetails(err error, detailsPtr interf func (t *temporalClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { errType := t.GetApplicationErrorTypeIfIsApplicationError(err) - var errDetails string - detailErr := t.GetApplicationErrorDetails(err, &errDetails) - if detailErr != nil { - errDetails = detailErr.Error() - } - return errType, errDetails + // TODO: Error Details will be added under IWF-511 + return errType, "" } func (t *temporalClient) StartInterpreterWorkflow( From 741909ec5ff55d28b31cfab878124424cf793142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Cac=CC=A7ador?= Date: Tue, 11 Feb 2025 11:43:08 +0000 Subject: [PATCH 4/4] IWF-511: Fixing ticket # --- service/client/cadence/client.go | 2 +- service/client/temporal/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service/client/cadence/client.go b/service/client/cadence/client.go index 3c6f869b..353f2a68 100644 --- a/service/client/cadence/client.go +++ b/service/client/cadence/client.go @@ -91,7 +91,7 @@ func (t *cadenceClient) GetApplicationErrorDetails(err error, detailsPtr interfa func (t *cadenceClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { errType := t.GetApplicationErrorTypeIfIsApplicationError(err) - // TODO: Error Details will be added under IWF-511 + // TODO: Error Details will be added under IWF-567 return errType, "" } diff --git a/service/client/temporal/client.go b/service/client/temporal/client.go index a2f4a3ed..ba227aba 100644 --- a/service/client/temporal/client.go +++ b/service/client/temporal/client.go @@ -119,7 +119,7 @@ func (t *temporalClient) GetApplicationErrorDetails(err error, detailsPtr interf func (t *temporalClient) GetApplicationErrorTypeAndDetails(err error) (string, string) { errType := t.GetApplicationErrorTypeIfIsApplicationError(err) - // TODO: Error Details will be added under IWF-511 + // TODO: Error Details will be added under IWF-567 return errType, "" }