diff --git a/services/identity/src/grpc_services/authenticated.rs b/services/identity/src/grpc_services/authenticated.rs --- a/services/identity/src/grpc_services/authenticated.rs +++ b/services/identity/src/grpc_services/authenticated.rs @@ -198,12 +198,14 @@ identity_info: Some(identity_info), }); - let keyserver_info = self + let Some(keyserver_info) = self .db_client .get_keyserver_keys_for_user(&message.user_id) .await .map_err(handle_db_error)? - .map(OutboundKeyInfo::from); + else { + return Err(Status::not_found("keyserver not found")); + }; let primary_device_data = self .db_client @@ -213,7 +215,7 @@ let primary_device_keys = primary_device_data.device_key_info; let response = Response::new(KeyserverKeysResponse { - keyserver_info, + keyserver_info: Some(keyserver_info.into()), identity, primary_device_identity_info: Some(primary_device_keys.into()), }); diff --git a/shared/protos/identity_auth.proto b/shared/protos/identity_auth.proto --- a/shared/protos/identity_auth.proto +++ b/shared/protos/identity_auth.proto @@ -116,7 +116,7 @@ } message KeyserverKeysResponse { - optional OutboundKeyInfo keyserver_info = 1; + OutboundKeyInfo keyserver_info = 1; Identity identity = 2; identity.unauth.IdentityKeyInfo primary_device_identity_info = 3; } diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow --- a/web/protobufs/identity-auth-structs.cjs.flow +++ b/web/protobufs/identity-auth-structs.cjs.flow @@ -170,7 +170,7 @@ } export type KeyserverKeysResponseObject = { - keyserverInfo?: OutboundKeyInfoObject, + keyserverInfo: ?OutboundKeyInfoObject, identity: ?IdentityObject, primaryDeviceIdentityInfo: ?identityStructs.IdentityKeyInfoObject, };