(owner: Owner)
| 1892 | }; |
| 1893 | |
| 1894 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1895 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1896 | if (subject == null) { |
| 1897 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1898 | throw new StorageError({ |
| 1899 | message: `Cannot target owner "user": executor has no subject.`, |
| 1900 | cause: undefined, |
| 1901 | }); |
| 1902 | } |
| 1903 | return { tenant, owner, subject }; |
| 1904 | }; |
| 1905 | |
| 1906 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1907 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected