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.
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.
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.
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.
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.
| } | ||
| ) | ||
|
|
||
| // NewNamespaceUnavailable returns new NamespaceInvalidState error. |
There was a problem hiding this comment.
NamespaceInvalidState error?
There was a problem hiding this comment.
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.