diff --git a/service/history/consts/const.go b/service/history/consts/const.go index 7fd4ea177aa..059cc9a7d10 100644 --- a/service/history/consts/const.go +++ b/service/history/consts/const.go @@ -69,8 +69,8 @@ var ( ErrDeserializingToken = serviceerror.NewInvalidArgument("error deserializing task token") // ErrSignalsLimitExceeded is the error indicating limit reached for maximum number of signal events ErrSignalsLimitExceeded = serviceerror.NewInvalidArgument("exceeded workflow execution limit for signal events") - // ErrWorkflowClosing is the error indicating requests to workflow got rejected due to workflow is closing - ErrWorkflowClosing = serviceerror.NewWorkflowNotReady("workflow operation rejected because workflow is closing") + // ErrWorkflowClosing is the error indicating requests to workflow can not be applied as workflow is closing + ErrWorkflowClosing = serviceerror.NewResourceExhausted(enumspb.RESOURCE_EXHAUSTED_CAUSE_BUSY_WORKFLOW, "workflow operation can not be applied because workflow is closing") // ErrEventsAterWorkflowFinish is the error indicating server error trying to write events after workflow finish event ErrEventsAterWorkflowFinish = serviceerror.NewInternal("error validating last event being workflow finish event") // ErrQueryEnteredInvalidState is error indicating query entered invalid state