( directory: AdminIdentityDirectory | undefined, externalIds: readonly string[], )
| 127 | * operator actually asked for. Logged once per failed page — the cause carries |
| 128 | * the detail, and the caller learns nothing from it. */ |
| 129 | const resolveIdentities = ( |
| 130 | directory: AdminIdentityDirectory | undefined, |
| 131 | externalIds: readonly string[], |
| 132 | ): Effect.Effect<ReadonlyMap<string, AdminUserIdentity>> => { |
| 133 | if (!directory || externalIds.length === 0) return Effect.succeed(new Map()); |
| 134 | return directory(externalIds).pipe( |
| 135 | Effect.catchCause((cause) => |
| 136 | Effect.as( |
| 137 | Effect.logWarning("admin users: host identity lookup failed; reporting users unnamed", { |
| 138 | cause, |
| 139 | }), |
| 140 | new Map<string, AdminUserIdentity>(), |
| 141 | ), |
| 142 | ), |
| 143 | ); |
| 144 | }; |
| 145 | |
| 146 | const ABSENT_IDENTITY: AdminUserIdentity = { email: null, displayName: null }; |
| 147 |
no outgoing calls
no test coverage detected