(owner: Owner)
| 1592 | }; |
| 1593 | |
| 1594 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1595 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1596 | if (subject == null) { |
| 1597 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1598 | throw new StorageError({ |
| 1599 | message: `Cannot target owner "user": executor has no subject.`, |
| 1600 | cause: undefined, |
| 1601 | }); |
| 1602 | } |
| 1603 | return { tenant, owner, subject }; |
| 1604 | }; |
| 1605 | |
| 1606 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1607 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected