diff --git a/.deadcode-out b/.deadcode-out
index 9845b885a1..e7e6d217ab 100644
--- a/.deadcode-out
+++ b/.deadcode-out
@@ -131,7 +131,6 @@ package "code.gitea.io/gitea/models/user"
 	func (ErrUserInactive).Unwrap
 	func IsErrExternalLoginUserAlreadyExist
 	func IsErrExternalLoginUserNotExist
-	func NewFederatedUser
 	func IsErrUserSettingIsNotExist
 	func GetUserAllSettings
 	func DeleteUserSetting
diff --git a/modules/forgefed/actor.go b/modules/forgefed/actor.go
index 29d6f15d8b..d3cae20dec 100644
--- a/modules/forgefed/actor.go
+++ b/modules/forgefed/actor.go
@@ -137,8 +137,8 @@ func NewRepositoryID(uri, source string) (RepositoryID, error) {
 
 	// validate Person specific path
 	repoID := RepositoryID{result}
-	if valid, outcome := validation.IsValid(repoID); !valid {
-		return RepositoryID{}, outcome
+	if valid, err := validation.IsValid(repoID); !valid {
+		return RepositoryID{}, err
 	}
 
 	return repoID, nil