diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go index 224013403..a167a5a77 100644 --- a/clientapi/routing/sendevent.go +++ b/clientapi/routing/sendevent.go @@ -318,8 +318,8 @@ func generateSendEvent( senderID, err := rsAPI.QuerySenderIDForUser(ctx, *validRoomID, *fullUserID) if err != nil { return nil, &util.JSONResponse{ - Code: http.StatusNotFound, - JSON: spec.NotFound("Unable to find senderID for user"), + Code: http.StatusInternalServerError, + JSON: spec.NotFound("internal server error"), } } else if senderID == nil { // TODO: is it always the case that lack of a sender ID means they're not joined? diff --git a/federationapi/consumers/presence.go b/federationapi/consumers/presence.go index a0dab7ab9..dd100bc08 100644 --- a/federationapi/consumers/presence.go +++ b/federationapi/consumers/presence.go @@ -97,7 +97,7 @@ func (t *OutputPresenceConsumer) onMessage(ctx context.Context, msgs []*nats.Msg parsedUserID, err := spec.NewUserID(userID, true) if err != nil { - util.GetLogger(ctx).WithError(err).WithField("user_id", userID).Error("failed to extract domain from receipt sender") + util.GetLogger(ctx).WithError(err).WithField("user_id", userID).Error("invalid user ID") return true }