From a51b613496b43dc777bd68fab89e317db4b9ea17 Mon Sep 17 00:00:00 2001 From: Vytautas Date: Wed, 11 May 2022 10:20:24 +0300 Subject: [PATCH] Log error fields as tags (#4801) * Log error fields as tags * Update common/log/loggerimpl/logger.go Co-authored-by: Steven L * Fix syntax error * Use zap ObjectMarshaler for nested fields Co-authored-by: Steven L --- .../validator/queryValidator_test.go | 22 +-- .../validator/searchAttrValidator_test.go | 12 +- common/log/loggerimpl/logger.go | 5 + common/log/loggerimpl/logger_test.go | 23 +++ common/log/tag/tags.go | 10 -- .../invariant/historyExists_test.go | 2 +- .../invariant/openCurrentExecution_test.go | 2 +- common/types/errors.go | 132 +++++++++--------- host/integration_test.go | 2 +- service/history/decision/checker_test.go | 14 +- service/history/historyEngine_test.go | 10 +- service/worker/esanalyzer/analyzer_test.go | 2 +- 12 files changed, 127 insertions(+), 109 deletions(-) diff --git a/common/elasticsearch/validator/queryValidator_test.go b/common/elasticsearch/validator/queryValidator_test.go index 2ee369482cf..aeb71d2c805 100644 --- a/common/elasticsearch/validator/queryValidator_test.go +++ b/common/elasticsearch/validator/queryValidator_test.go @@ -59,32 +59,32 @@ func TestValidateQuery(t *testing.T) { { msg: "invalid SQL", query: "Invalid SQL", - err: "BadRequestError{Message: Invalid query.}", + err: "Invalid query.", }, { msg: "invalid where expression", query: "InvalidWhereExpr", - err: "BadRequestError{Message: invalid where clause}", + err: "invalid where clause", }, { msg: "invalid comparison", query: "WorkflowID = 'wid' and 1 < 2", - err: "BadRequestError{Message: invalid comparison expression}", + err: "invalid comparison expression", }, { msg: "invalid range", query: "1 between 1 and 2 or WorkflowID = 'wid'", - err: "BadRequestError{Message: invalid range expression}", + err: "invalid range expression", }, { msg: "invalid search attribute in comparison", query: "Invalid = 'a' and 1 < 2", - err: "BadRequestError{Message: invalid search attribute}", + err: "invalid search attribute", }, { msg: "invalid search attribute in range", query: "Invalid between 1 and 2 or WorkflowID = 'wid'", - err: "BadRequestError{Message: invalid search attribute}", + err: "invalid search attribute", }, { msg: "only order by", @@ -104,27 +104,27 @@ func TestValidateQuery(t *testing.T) { { msg: "invalid order by attribute", query: "order by InvalidField desc", - err: "BadRequestError{Message: invalid order by attribute}", + err: "invalid order by attribute", }, { msg: "invalid order by attribute expr", query: "order by 123", - err: "BadRequestError{Message: invalid order by expression}", + err: "invalid order by expression", }, { msg: "security SQL injection - with another statement", query: "WorkflowID = 'wid'; SELECT * FROM important_table;", - err: "BadRequestError{Message: Invalid query.}", + err: "Invalid query.", }, { msg: "security SQL injection - with always true expression", query: "WorkflowID = 'wid' and (RunID = 'rid' or 1 = 1)", - err: "BadRequestError{Message: invalid comparison expression}", + err: "invalid comparison expression", }, { msg: "security SQL injection - with union", query: "WorkflowID = 'wid' union select * from dummy", - err: "BadRequestError{Message: Invalid select query.}", + err: "Invalid select query.", }, } diff --git a/common/elasticsearch/validator/searchAttrValidator_test.go b/common/elasticsearch/validator/searchAttrValidator_test.go index bff0f7d0316..84694741bff 100644 --- a/common/elasticsearch/validator/searchAttrValidator_test.go +++ b/common/elasticsearch/validator/searchAttrValidator_test.go @@ -73,14 +73,14 @@ func (s *searchAttributesValidatorSuite) TestValidateSearchAttributes() { } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal("BadRequestError{Message: number of keys 3 exceed limit}", err.Error()) + s.Equal("number of keys 3 exceed limit", err.Error()) fields = map[string][]byte{ "InvalidKey": []byte(`"1"`), } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal(`BadRequestError{Message: InvalidKey is not a valid search attribute key}`, err.Error()) + s.Equal(`InvalidKey is not a valid search attribute key`, err.Error()) fields = map[string][]byte{ "CustomStringField": []byte(`"1"`), @@ -88,7 +88,7 @@ func (s *searchAttributesValidatorSuite) TestValidateSearchAttributes() { } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal(`BadRequestError{Message: 123 is not a valid search attribute value for key CustomBoolField}`, err.Error()) + s.Equal(`123 is not a valid search attribute value for key CustomBoolField`, err.Error()) fields = map[string][]byte{ "CustomIntField": []byte(`[1,2]`), @@ -102,14 +102,14 @@ func (s *searchAttributesValidatorSuite) TestValidateSearchAttributes() { } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal(`BadRequestError{Message: StartTime is read-only Cadence reservered attribute}`, err.Error()) + s.Equal(`StartTime is read-only Cadence reservered attribute`, err.Error()) fields = map[string][]byte{ "CustomKeywordField": []byte(`"123456"`), } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal(`BadRequestError{Message: size limit exceed for key CustomKeywordField}`, err.Error()) + s.Equal(`size limit exceed for key CustomKeywordField`, err.Error()) fields = map[string][]byte{ "CustomKeywordField": []byte(`"123"`), @@ -117,5 +117,5 @@ func (s *searchAttributesValidatorSuite) TestValidateSearchAttributes() { } attr.IndexedFields = fields err = validator.ValidateSearchAttributes(attr, domain) - s.Equal(`BadRequestError{Message: total size 44 exceed limit}`, err.Error()) + s.Equal(`total size 44 exceed limit`, err.Error()) } diff --git a/common/log/loggerimpl/logger.go b/common/log/loggerimpl/logger.go index 3a4bc50f4bd..bbb1c589f7b 100644 --- a/common/log/loggerimpl/logger.go +++ b/common/log/loggerimpl/logger.go @@ -27,6 +27,7 @@ import ( "github.com/stretchr/testify/suite" "go.uber.org/zap" + "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest" "github.com/uber/cadence/common/log" @@ -96,6 +97,10 @@ func (lg *loggerImpl) buildFields(tags []tag.Tag) []zap.Field { continue } fs = append(fs, f) + + if obj, ok := f.Interface.(zapcore.ObjectMarshaler); ok && f.Type == zapcore.ErrorType { + fs = append(fs, zap.Object(f.Key+"-details", obj)) + } } return fs } diff --git a/common/log/loggerimpl/logger_test.go b/common/log/loggerimpl/logger_test.go index 48eedc581ad..d61862e3052 100644 --- a/common/log/loggerimpl/logger_test.go +++ b/common/log/loggerimpl/logger_test.go @@ -31,6 +31,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap" + "go.uber.org/zap/zapcore" "github.com/uber/cadence/common/dynamicconfig" "github.com/uber/cadence/common/log/tag" @@ -132,3 +133,25 @@ func TestEmptyMsg(t *testing.T) { assert.Equal(t, out, `{"level":"info","msg":"`+defaultMsgForEmpty+`","error":"test error","wf-action":"add-workflow-started-event","logging-call-at":"logger_test.go:`+lineNum+`"}`+"\n") } + +func TestErrorWithDetails(t *testing.T) { + sb := &strings.Builder{} + zapLogger := zap.New(zapcore.NewCore(zapcore.NewJSONEncoder(zapcore.EncoderConfig{MessageKey: "msg"}), zapcore.AddSync(sb), zap.DebugLevel)) + logger := NewLogger(zapLogger) + + err := &testError{"workflow123"} + logger.Error("oh no", tag.Error(err)) + zapLogger.Sync() + + assert.Contains(t, sb.String(), `"msg":"oh no","error":"test error","error-details":{"workflow-id":"workflow123"}`) +} + +type testError struct { + WorkflowId string +} + +func (e testError) Error() string { return "test error" } +func (e testError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("workflow-id", e.WorkflowId) + return nil +} diff --git a/common/log/tag/tags.go b/common/log/tag/tags.go index 7a7b3a270ba..afee4468f8c 100644 --- a/common/log/tag/tags.go +++ b/common/log/tag/tags.go @@ -202,16 +202,6 @@ func WorkflowNextEventID(nextEventID int64) Tag { return newInt64("wf-next-event-id", nextEventID) } -// WorkflowBeginningFirstEventID returns tag for WorkflowBeginningFirstEventID -func WorkflowBeginningFirstEventID(beginningFirstEventID int64) Tag { - return newInt64("wf-begining-first-event-id", beginningFirstEventID) -} - -// WorkflowEndingNextEventID returns tag for WorkflowEndingNextEventID -func WorkflowEndingNextEventID(endingNextEventID int64) Tag { - return newInt64("wf-ending-next-event-id", endingNextEventID) -} - // WorkflowResetNextEventID returns tag for WorkflowResetNextEventID func WorkflowResetNextEventID(resetNextEventID int64) Tag { return newInt64("wf-reset-next-event-id", resetNextEventID) diff --git a/common/reconciliation/invariant/historyExists_test.go b/common/reconciliation/invariant/historyExists_test.go index e1a6dfc6e86..d1d8dbf8e2a 100644 --- a/common/reconciliation/invariant/historyExists_test.go +++ b/common/reconciliation/invariant/historyExists_test.go @@ -88,7 +88,7 @@ func (s *HistoryExistsSuite) TestCheck() { CheckResultType: CheckResultTypeCorrupted, InvariantName: HistoryExists, Info: "concrete execution exists but history does not exist", - InfoDetails: "EntityNotExistsError{Message: got entity not exists error}", + InfoDetails: "got entity not exists error", }, expectedResourcePopulated: false, }, diff --git a/common/reconciliation/invariant/openCurrentExecution_test.go b/common/reconciliation/invariant/openCurrentExecution_test.go index aa8c38fbd02..f2cf27782ea 100644 --- a/common/reconciliation/invariant/openCurrentExecution_test.go +++ b/common/reconciliation/invariant/openCurrentExecution_test.go @@ -107,7 +107,7 @@ func (s *OpenCurrentExecutionSuite) TestCheck() { CheckResultType: CheckResultTypeCorrupted, InvariantName: OpenCurrentExecution, Info: "execution is open without having current execution", - InfoDetails: "EntityNotExistsError{Message: }", + InfoDetails: "", }, }, { diff --git a/common/types/errors.go b/common/types/errors.go index 6c16743d4f1..70934daf866 100644 --- a/common/types/errors.go +++ b/common/types/errors.go @@ -21,139 +21,139 @@ package types import ( - "fmt" - "strings" + "go.uber.org/zap/zapcore" ) func (err AccessDeniedError) Error() string { - return fmt.Sprintf("AccessDeniedError{Message: %v}", err.Message) + return err.Message } func (err BadRequestError) Error() string { - return fmt.Sprintf("BadRequestError{Message: %v}", err.Message) + return err.Message } func (err CancellationAlreadyRequestedError) Error() string { - return fmt.Sprintf("CancellationAlreadyRequestedError{Message: %v}", err.Message) + return err.Message } func (err ClientVersionNotSupportedError) Error() string { - return fmt.Sprintf("ClientVersionNotSupportedError{FeatureVersion: %v, ClientImpl: %v, SupportedVersions: %v}", - err.FeatureVersion, - err.ClientImpl, - err.SupportedVersions) + return "client version not supported" +} + +func (err ClientVersionNotSupportedError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("feature-version", err.FeatureVersion) + enc.AddString("client-implementation", err.ClientImpl) + enc.AddString("supported-versions", err.SupportedVersions) + return nil } func (err FeatureNotEnabledError) Error() string { - return fmt.Sprintf("FeatureNotEnabledError{FeatureFlag: %v}", - err.FeatureFlag, - ) + return "feature not enabled" +} + +func (err FeatureNotEnabledError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("feature-flag", err.FeatureFlag) + return nil } func (err CurrentBranchChangedError) Error() string { - return fmt.Sprintf("CurrentBranchChangedError{Message: %v, CurrentBranchToken: %v}", - err.Message, - err.CurrentBranchToken) + return err.Message +} + +func (err CurrentBranchChangedError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("wf-branch-token", string(err.CurrentBranchToken)) + return nil } func (err DomainAlreadyExistsError) Error() string { - return fmt.Sprintf("DomainAlreadyExistsError{Message: %v}", err.Message) + return err.Message } func (err DomainNotActiveError) Error() string { - return fmt.Sprintf("DomainNotActiveError{Message: %v, DomainName: %v, CurrentCluster: %v, ActiveCluster: %v}", - err.Message, - err.DomainName, - err.CurrentCluster, - err.ActiveCluster, - ) + return err.Message +} + +func (err DomainNotActiveError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("domain-name", err.DomainName) + enc.AddString("current-cluster", err.CurrentCluster) + enc.AddString("active-cluster", err.ActiveCluster) + return nil } func (err EntityNotExistsError) Error() string { - sb := &strings.Builder{} - printField(sb, "Message", err.Message) - if err.CurrentCluster != "" { - printField(sb, "CurrentCluster", err.CurrentCluster) - } - if err.ActiveCluster != "" { - printField(sb, "ActiveCluster", err.ActiveCluster) - } - return fmt.Sprintf("EntityNotExistsError{%s}", sb.String()) + return err.Message } func (err WorkflowExecutionAlreadyCompletedError) Error() string { - sb := &strings.Builder{} - printField(sb, "Message", err.Message) - return fmt.Sprintf("WorkflowExecutionAlreadyCompletedError{%s}", sb.String()) + return err.Message } func (err InternalDataInconsistencyError) Error() string { - return fmt.Sprintf("InternalDataInconsistencyError{Message: %v}", err.Message) + return err.Message } func (err InternalServiceError) Error() string { - return fmt.Sprintf("InternalServiceError{Message: %v}", err.Message) + return err.Message } func (err LimitExceededError) Error() string { - return fmt.Sprintf("LimitExceededError{Message: %v}", err.Message) + return err.Message } func (err QueryFailedError) Error() string { - return fmt.Sprintf("QueryFailedError{Message: %v}", err.Message) + return err.Message } func (err RemoteSyncMatchedError) Error() string { - return fmt.Sprintf("RemoteSyncMatchedError{Message: %v}", err.Message) + return err.Message } func (err RetryTaskV2Error) Error() string { - sb := &strings.Builder{} - printField(sb, "Message", err.Message) - printField(sb, "DomainID", err.DomainID) - printField(sb, "WorkflowID", err.WorkflowID) - printField(sb, "RunID", err.RunID) + return err.Message +} + +func (err RetryTaskV2Error) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("domain-id", err.DomainID) + enc.AddString("workflow-id", err.WorkflowID) + enc.AddString("run-id", err.RunID) if err.StartEventID != nil { - printField(sb, "StartEventID", *err.StartEventID) + enc.AddInt64("start-event-id", *err.StartEventID) } if err.StartEventVersion != nil { - printField(sb, "StartEventVersion", *err.StartEventVersion) + enc.AddInt64("start-event-version", *err.StartEventVersion) } if err.EndEventID != nil { - printField(sb, "EndEventID", *err.EndEventID) + enc.AddInt64("end-event-id", *err.EndEventID) } if err.EndEventVersion != nil { - printField(sb, "EndEventVersion", *err.EndEventVersion) + enc.AddInt64("end-event-version", *err.EndEventVersion) } - return fmt.Sprintf("RetryTaskV2Error{%s}", sb.String()) + return nil } func (err ServiceBusyError) Error() string { - return fmt.Sprintf("ServiceBusyError{Message: %v}", err.Message) + return err.Message } func (err WorkflowExecutionAlreadyStartedError) Error() string { - sb := &strings.Builder{} - printField(sb, "Message", err.Message) - printField(sb, "StartRequestID", err.StartRequestID) - printField(sb, "RunID", err.RunID) - return fmt.Sprintf("WorkflowExecutionAlreadyStartedError{%s}", sb.String()) + return err.Message +} + +func (err WorkflowExecutionAlreadyStartedError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("start-request-id", err.StartRequestID) + enc.AddString("run-id", err.RunID) + return nil } func (err ShardOwnershipLostError) Error() string { - sb := &strings.Builder{} - printField(sb, "Message", err.Message) - printField(sb, "Owner", err.Owner) - return fmt.Sprintf("ShardOwnershipLostError{%s}", sb.String()) + return err.Message } -func (err EventAlreadyStartedError) Error() string { - return fmt.Sprintf("EventAlreadyStartedError{Message: %v}", err.Message) +func (err ShardOwnershipLostError) MarshalLogObject(enc zapcore.ObjectEncoder) error { + enc.AddString("shard-owner", err.Owner) + return nil } -func printField(sb *strings.Builder, field string, value interface{}) { - if sb.Len() > 0 { - fmt.Fprintf(sb, ", ") - } - fmt.Fprintf(sb, "%s: %v", field, value) +func (err EventAlreadyStartedError) Error() string { + return err.Message } diff --git a/host/integration_test.go b/host/integration_test.go index 2f13be33f51..dddce76f92b 100644 --- a/host/integration_test.go +++ b/host/integration_test.go @@ -1649,7 +1649,7 @@ func (s *IntegrationSuite) TestRateLimitBufferedEvents() { // first decision to send 101 signals, the last signal will force fail decision and flush buffered events. _, err := poller.PollAndProcessDecisionTask(false, false) s.Logger.Info("PollAndProcessDecisionTask", tag.Error(err)) - s.EqualError(err, "EntityNotExistsError{Message: Decision task not found.}") + s.EqualError(err, "Decision task not found.") // Process signal in decider _, err = poller.PollAndProcessDecisionTask(false, false) diff --git a/service/history/decision/checker_test.go b/service/history/decision/checker_test.go index 1bec16aaba1..39fc9f4dcab 100644 --- a/service/history/decision/checker_test.go +++ b/service/history/decision/checker_test.go @@ -131,20 +131,20 @@ func (s *attrValidatorSuite) TestValidateSignalExternalWorkflowExecutionAttribut var attributes *types.SignalExternalWorkflowExecutionDecisionAttributes err := s.validator.validateSignalExternalWorkflowExecutionAttributes(s.testDomainID, s.testTargetDomainID, attributes, metrics.HistoryRespondDecisionTaskCompletedScope) - s.EqualError(err, "BadRequestError{Message: SignalExternalWorkflowExecutionDecisionAttributes is not set on decision.}") + s.EqualError(err, "SignalExternalWorkflowExecutionDecisionAttributes is not set on decision.") attributes = &types.SignalExternalWorkflowExecutionDecisionAttributes{} err = s.validator.validateSignalExternalWorkflowExecutionAttributes(s.testDomainID, s.testTargetDomainID, attributes, metrics.HistoryRespondDecisionTaskCompletedScope) - s.EqualError(err, "BadRequestError{Message: Execution is nil on decision.}") + s.EqualError(err, "Execution is nil on decision.") attributes.Execution = &types.WorkflowExecution{} attributes.Execution.WorkflowID = "workflow-id" err = s.validator.validateSignalExternalWorkflowExecutionAttributes(s.testDomainID, s.testTargetDomainID, attributes, metrics.HistoryRespondDecisionTaskCompletedScope) - s.EqualError(err, "BadRequestError{Message: SignalName is not set on decision.}") + s.EqualError(err, "SignalName is not set on decision.") attributes.Execution.RunID = "run-id" err = s.validator.validateSignalExternalWorkflowExecutionAttributes(s.testDomainID, s.testTargetDomainID, attributes, metrics.HistoryRespondDecisionTaskCompletedScope) - s.EqualError(err, "BadRequestError{Message: Invalid RunId set on decision.}") + s.EqualError(err, "Invalid RunId set on decision.") attributes.Execution.RunID = constants.TestRunID attributes.SignalName = "my signal name" @@ -161,15 +161,15 @@ func (s *attrValidatorSuite) TestValidateUpsertWorkflowSearchAttributes() { var attributes *types.UpsertWorkflowSearchAttributesDecisionAttributes err := s.validator.validateUpsertWorkflowSearchAttributes(domainName, attributes) - s.EqualError(err, "BadRequestError{Message: UpsertWorkflowSearchAttributesDecisionAttributes is not set on decision.}") + s.EqualError(err, "UpsertWorkflowSearchAttributesDecisionAttributes is not set on decision.") attributes = &types.UpsertWorkflowSearchAttributesDecisionAttributes{} err = s.validator.validateUpsertWorkflowSearchAttributes(domainName, attributes) - s.EqualError(err, "BadRequestError{Message: SearchAttributes is not set on decision.}") + s.EqualError(err, "SearchAttributes is not set on decision.") attributes.SearchAttributes = &types.SearchAttributes{} err = s.validator.validateUpsertWorkflowSearchAttributes(domainName, attributes) - s.EqualError(err, "BadRequestError{Message: IndexedFields is empty on decision.}") + s.EqualError(err, "IndexedFields is empty on decision.") attributes.SearchAttributes.IndexedFields = map[string][]byte{"CustomKeywordField": []byte(`"bytes"`)} err = s.validator.validateUpsertWorkflowSearchAttributes(domainName, attributes) diff --git a/service/history/historyEngine_test.go b/service/history/historyEngine_test.go index d0ddf195803..47b74379a84 100644 --- a/service/history/historyEngine_test.go +++ b/service/history/historyEngine_test.go @@ -2272,7 +2272,7 @@ func (s *engineSuite) TestRespondDecisionTaskCompletedSignalExternalWorkflowFail }, }) - s.EqualError(err, "BadRequestError{Message: RunID is not valid UUID.}") + s.EqualError(err, "RunID is not valid UUID.") } func (s *engineSuite) TestRespondDecisionTaskCompletedSignalExternalWorkflowFailed_UnKnownDomain() { @@ -2452,7 +2452,7 @@ func (s *engineSuite) TestRespondActivityTaskCompletedIfNoAIdProvided() { Identity: identity, }, }) - s.EqualError(err, "BadRequestError{Message: Neither ActivityID nor ScheduleID is provided}") + s.EqualError(err, "Neither ActivityID nor ScheduleID is provided") } func (s *engineSuite) TestRespondActivityTaskCompletedIfNotFound() { @@ -3022,7 +3022,7 @@ func (s *engineSuite) TestRespondActivityTaskFailededIfNoAIdProvided() { Identity: identity, }, }) - s.EqualError(err, "BadRequestError{Message: Neither ActivityID nor ScheduleID is provided}") + s.EqualError(err, "Neither ActivityID nor ScheduleID is provided") } func (s *engineSuite) TestRespondActivityTaskFailededIfNotFound() { @@ -3865,7 +3865,7 @@ func (s *engineSuite) TestRespondActivityTaskCanceledIfNoAIdProvided() { Identity: identity, }, }) - s.EqualError(err, "BadRequestError{Message: Neither ActivityID nor ScheduleID is provided}") + s.EqualError(err, "Neither ActivityID nor ScheduleID is provided") } func (s *engineSuite) TestRespondActivityTaskCanceledIfNotFound() { @@ -5078,7 +5078,7 @@ func (s *engineSuite) TestSignalWorkflowExecution_WorkflowCompleted() { s.mockExecutionMgr.On("GetWorkflowExecution", mock.Anything, mock.Anything).Return(gwmsResponse, nil).Once() err := s.mockHistoryEngine.SignalWorkflowExecution(context.Background(), signalRequest) - s.EqualError(err, "WorkflowExecutionAlreadyCompletedError{Message: workflow execution already completed}") + s.EqualError(err, "workflow execution already completed") } func (s *engineSuite) TestRemoveSignalMutableState() { diff --git a/service/worker/esanalyzer/analyzer_test.go b/service/worker/esanalyzer/analyzer_test.go index a3e7da3e207..df29a1b3b5e 100644 --- a/service/worker/esanalyzer/analyzer_test.go +++ b/service/worker/esanalyzer/analyzer_test.go @@ -382,7 +382,7 @@ func (s *esanalyzerWorkflowTestSuite) TestRefreshStuckWorkflowsFromSameWorkflowI _, err := s.activityEnv.ExecuteActivity(s.workflow.refreshStuckWorkflowsFromSameWorkflowType, workflows) s.Error(err) - s.EqualError(err, "InternalServiceError{Message: Inconsistent worklow. Expected domainID: deadbeef-0123-4567-890a-bcdef0123460, actual: another-domain-id}") + s.EqualError(err, "Inconsistent worklow. Expected domainID: deadbeef-0123-4567-890a-bcdef0123460, actual: another-domain-id") } func (s *esanalyzerWorkflowTestSuite) TestGetLongRunCheckEntriesSingleEntry() {