You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not use Unvailable as error type for expected error cases (#4650)
<!-- Describe what has changed in this PR -->
**What changed?**
Do not use Unavailable error type for expected error cases.
<!-- Tell your future self why have you made these changes -->
**Why?**
To correctly reflect the error case.
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
eye_balls
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
No
<!-- Is this PR a hotfix candidate or require that a notification be
sent to the broader community? (Yes/No) -->
**Is hotfix candidate?**
No
Copy file name to clipboardExpand all lines: service/history/consts/const.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,13 +70,13 @@ var (
70
70
// ErrSignalsLimitExceeded is the error indicating limit reached for maximum number of signal events
71
71
ErrSignalsLimitExceeded=serviceerror.NewInvalidArgument("exceeded workflow execution limit for signal events")
72
72
// ErrWorkflowClosing is the error indicating requests to workflow got rejected due to workflow is closing
73
-
ErrWorkflowClosing=serviceerror.NewUnavailable("workflow operation rejected because workflow is closing")
73
+
ErrWorkflowClosing=serviceerror.NewWorkflowNotReady("workflow operation rejected because workflow is closing")
74
74
// ErrEventsAterWorkflowFinish is the error indicating server error trying to write events after workflow finish event
75
75
ErrEventsAterWorkflowFinish=serviceerror.NewInternal("error validating last event being workflow finish event")
76
76
// ErrQueryEnteredInvalidState is error indicating query entered invalid state
77
77
ErrQueryEnteredInvalidState=serviceerror.NewInvalidArgument("query entered invalid state, this should be impossible")
78
78
// ErrConsistentQueryBufferExceeded is error indicating that too many consistent queries have been buffered and until buffered queries are finished new consistent queries cannot be buffered
79
-
ErrConsistentQueryBufferExceeded=serviceerror.NewUnavailable("consistent query buffer is full, cannot accept new consistent queries")
79
+
ErrConsistentQueryBufferExceeded=serviceerror.NewWorkflowNotReady("consistent query buffer is full, this may be caused by too many queries and workflow not able to process query fast enough")
80
80
// ErrEmptyHistoryRawEventBatch indicate that one single batch of history raw events is of size 0
81
81
ErrEmptyHistoryRawEventBatch=serviceerror.NewInvalidArgument("encountered empty history batch")
82
82
// ErrHistorySizeExceedsLimit is error indicating workflow execution has exceeded system defined history size limit
0 commit comments