(executor: Executor)
| 40 | * owner has no users"). |
| 41 | */ |
| 42 | export const platformViewOf = (executor: Executor): Effect.Effect<ExecutorAdmin, AdminUsersError> => |
| 43 | executor.admin |
| 44 | ? Effect.succeed(executor.admin) |
| 45 | : Effect.fail( |
| 46 | new AdminUsersError({ |
| 47 | message: "Admin reads require an executor built with the platform view enabled", |
| 48 | }), |
| 49 | ); |
| 50 | |
| 51 | // Storage faults are the only failure these reads can raise. They surface as a |
| 52 | // 500 with a flat message — the cause carries the detail into the host's error |
no outgoing calls