-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update error code and message for missing activity task. #2561
Conversation
service/history/historyEngine.go
Outdated
@@ -2850,11 +2850,11 @@ func getScheduleID( | |||
) (int64, error) { | |||
|
|||
if activityID == "" { | |||
return 0, serviceerror.NewInvalidArgument("Neither ActivityID nor ScheduleID is provided") | |||
return 0, serviceerror.NewInvalidArgument("invalid ActivityID provided") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid activity ID
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that is a fair point.
idiomatic go says errors should be lower cased so they can be fmt'ed
into a logging line which may be sentenced cased.
I did depart from what was there before, happy to change though to keep consistency.
I can definitely break apart ActivityID
.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just say activityID cannot be empty
service/history/historyEngine.go
Outdated
} | ||
activityInfo, ok := mutableState.GetActivityByActivityID(activityID) | ||
if !ok { | ||
return 0, serviceerror.NewInvalidArgument("Cannot locate Activity ScheduleID") | ||
return 0, serviceerror.NewNotFound(fmt.Sprintf("cannot locate active task for ActivityID %s, check workflow execution history for more details", activityID)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest: cannot find pending activity with ActivityID %s
service/history/historyEngine.go
Outdated
@@ -2850,11 +2850,11 @@ func getScheduleID( | |||
) (int64, error) { | |||
|
|||
if activityID == "" { | |||
return 0, serviceerror.NewInvalidArgument("Neither ActivityID nor ScheduleID is provided") | |||
return 0, serviceerror.NewInvalidArgument("invalid ActivityID provided") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just say activityID cannot be empty
What changed?
Error code and message for missing activity task
Why?
A bit more clear on reason for failure and direction for investigation
#2538
How did you test it?
unit tests
Potential risks
None
Is hotfix candidate?
No