Commit e2bb5af
committed
Fix isPlatformError check: use instanceof instead of Predicate.isTagged
Predicate.isTagged(u, 'PlatformError') checks u._tag === 'PlatformError', but
PlatformError is a union of BadArgument (_tag: 'BadArgument') and SystemError
(_tag: 'SystemError'), so the check never matched. This silently broke the
AlreadyExists race-condition recovery in getOrCreateRandom.
Use 'instanceof PlatformError.PlatformError' instead, consistent with the
existing check in the remove function.1 parent 4af9463 commit e2bb5af
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | | - | |
| 105 | + | |
| 106 | + | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
0 commit comments