-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add NamespaceUnavailable serviceerror #194
Add NamespaceUnavailable serviceerror #194
Conversation
c617e5a
to
10ebbfd
Compare
// Note that other service errors have a private status.Status field, there's no compelling reason to do | ||
// copy that pattern here. The status can and should be computed on the fly in case the |
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.
Is there a compelling reason to not copy the pattern? Technically one reason that copying the pattern is that the status object could contain additional details. But that's not likely to happen. Still, I see no good reason not to keep the status object as we always have.
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'm actually thinking of taking it to the other direction and not even keeping the message from the wire. That way if the error is mutated (e.g. a different Namespace
string is set, it is serialized correctly).
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 wouldn't put too much thought into it, just keep the status you're given like other similar errors
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.
Lol, I'll just do that to move things along. I wanted to improve what we had, but I can see arguments in both directions.
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.
Done.
} | ||
) | ||
|
||
// NewNamespaceUnavailable returns new NamespaceInvalidState error. |
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.
NamespaceInvalidState error?
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.
Thanks, I should have replaced with /g
.
Continue the work I started in temporalio/api#481.
Why?
To differentiate between a namespace that's temporary unavailable and not active.
This new failure will be returned with a gRPC unavailable error and should be retried by clients automatically.