(owner: Owner)
| 1293 | }; |
| 1294 | |
| 1295 | const ownedKeys = (owner: Owner): OwnedKeys => { |
| 1296 | if (owner === "org") return { tenant, owner, subject: ORG_SUBJECT }; |
| 1297 | if (subject == null) { |
| 1298 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: programmer error caught and surfaced as StorageError below by callers |
| 1299 | throw new StorageError({ |
| 1300 | message: `Cannot target owner "user": executor has no subject.`, |
| 1301 | cause: undefined, |
| 1302 | }); |
| 1303 | } |
| 1304 | return { tenant, owner, subject }; |
| 1305 | }; |
| 1306 | |
| 1307 | const requireUserSubject = (owner: Owner): Effect.Effect<void, StorageFailure> => |
| 1308 | owner === "user" && subject == null |
no outgoing calls
no test coverage detected