feat: add durable safe retries with uncertainty tracking and SDK examples
This commit is contained in:
@@ -120,6 +120,9 @@ func (s *Service) Finish(ctx context.Context, t auth.Token, b Binding, message c
|
||||
if in.Outcome != "SUCCEEDED" && in.Outcome != "FAILED" && in.Outcome != "UNKNOWN" {
|
||||
return CommandResult{}, fault.Invalid("invalid result outcome")
|
||||
}
|
||||
if in.Retryable && in.Outcome != "FAILED" {
|
||||
return CommandResult{}, fault.Invalid("retryable is only valid for known failure")
|
||||
}
|
||||
if len(in.Result) == 0 || len(in.Result) > 256<<10 || bytes.Equal(bytes.TrimSpace(in.Result), []byte("null")) {
|
||||
return CommandResult{}, fault.Invalid("result must be non-null JSON up to 256 KiB")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user