(owner: Owner)
| 1831 | }; |
| 1832 | |
| 1833 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1834 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1835 | if (subject == null) { |
| 1836 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1837 | throw new StorageError({ |
| 1838 | message: `Cannot target owner "user": executor has no subject.`, |
| 1839 | cause: undefined, |
| 1840 | }); |
| 1841 | } |
| 1842 | return { tenant, owner, subject }; |
| 1843 | }; |
| 1844 | |
| 1845 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1846 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected