(owner: Owner)
| 1315 | }; |
| 1316 | |
| 1317 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1318 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1319 | if (subject == null) { |
| 1320 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1321 | throw new StorageError({ |
| 1322 | message: `Cannot target owner "user": executor has no subject.`, |
| 1323 | cause: undefined, |
| 1324 | }); |
| 1325 | } |
| 1326 | return { tenant, owner, subject }; |
| 1327 | }; |
| 1328 | |
| 1329 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1330 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected