Commit a98b60e
authored
Don't compare an issueSet with nil (temporalio#5563)
## What changed?
<!-- Describe what has changed in this PR -->
There was a small issue in temporalio#5523 where we check an "issue set" against
nil in the outgoing service registry code. The issue set is supposed to
track a list of request issues to form one big invalid argument error if
its length is greater than zero. However, we had code that looked like
this:
```go
if issues := getIssuesFromCommonRequest(req); issues != nil {
return nil, issues.GetError()
}
```
Which works because we return a nil issues set if there's no issues,
but, technically, we could have a non-nil issues set with no issues, so
it should instead be something like this:
```go
if err := getIssuesFromCommonRequest(req).GetError(); err != nil {
return nil, err
}
```
## Why?
<!-- Tell your future self why have you made these changes -->
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->1 parent 970e80f commit a98b60e
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
0 commit comments