diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go index 993c217cb..5ea436f66 100644 --- a/clientapi/routing/profile.go +++ b/clientapi/routing/profile.go @@ -292,7 +292,7 @@ func getProfile( if domain != cfg.Matrix.ServerName { profile, fedErr := federation.LookupProfile(ctx, domain, userID, "") if fedErr != nil { - if x, ok := err.(gomatrix.HTTPError); ok { + if x, ok := fedErr.(gomatrix.HTTPError); ok { if x.Code == http.StatusNotFound { return nil, common.ErrProfileNoExists }