( directory: AdminIdentityDirectory | undefined, externalIds: readonly string[], )
| 143 | * operator actually asked for. Logged once per failed page — the cause carries |
| 144 | * the detail, and the caller learns nothing from it. */ |
| 145 | const resolveIdentities = ( |
| 146 | directory: AdminIdentityDirectory | undefined, |
| 147 | externalIds: readonly string[], |
| 148 | ): Effect.Effect<ReadonlyMap<string, AdminUserIdentity>> => { |
| 149 | if (!directory || externalIds.length === 0) return Effect.succeed(new Map()); |
| 150 | return directory(externalIds).pipe( |
| 151 | Effect.catchCause((cause) => |
| 152 | Effect.as( |
| 153 | Effect.logWarning("admin users: host identity lookup failed; reporting users unnamed", { |
| 154 | cause, |
| 155 | }), |
| 156 | new Map<string, AdminUserIdentity>(), |
| 157 | ), |
| 158 | ), |
| 159 | ); |
| 160 | }; |
| 161 | |
| 162 | const ABSENT_IDENTITY: AdminUserIdentity = { email: null, displayName: null }; |
| 163 |
no outgoing calls
no test coverage detected