(owner: Owner)
| 1554 | }; |
| 1555 | |
| 1556 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1557 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1558 | if (subject == null) { |
| 1559 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1560 | throw new StorageError({ |
| 1561 | message: `Cannot target owner "user": executor has no subject.`, |
| 1562 | cause: undefined, |
| 1563 | }); |
| 1564 | } |
| 1565 | return { tenant, owner, subject }; |
| 1566 | }; |
| 1567 | |
| 1568 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1569 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected