(owner: Owner)
| 1911 | }; |
| 1912 | |
| 1913 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1914 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1915 | if (subject == null) { |
| 1916 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1917 | throw new StorageError({ |
| 1918 | message: `Cannot target owner "user": executor has no subject.`, |
| 1919 | cause: undefined, |
| 1920 | }); |
| 1921 | } |
| 1922 | return { tenant, owner, subject }; |
| 1923 | }; |
| 1924 | |
| 1925 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1926 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected