(owner: Owner)
| 1925 | }; |
| 1926 | |
| 1927 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1928 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1929 | if (subject == null) { |
| 1930 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1931 | throw new StorageError({ |
| 1932 | message: `Cannot target owner "user": executor has no subject.`, |
| 1933 | cause: undefined, |
| 1934 | }); |
| 1935 | } |
| 1936 | return { tenant, owner, subject }; |
| 1937 | }; |
| 1938 | |
| 1939 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1940 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected