Signed-off-by: oppiliappan me@oppi.li
+1
-4
knotserver/xrpc/repo_branch.go
+1
-4
knotserver/xrpc/repo_branch.go
+1
-4
knotserver/xrpc/repo_branches.go
+1
-4
knotserver/xrpc/repo_branches.go
+1
-4
knotserver/xrpc/repo_compare.go
+1
-4
knotserver/xrpc/repo_compare.go
+2
-8
knotserver/xrpc/xrpc.go
+2
-8
knotserver/xrpc/xrpc.go
···
101
// Construct repository path using the same logic as didPath
102
didRepoPath, err := securejoin.SecureJoin(did, repoName)
103
if err != nil {
104
-
return "", xrpcerr.NewXrpcError(
105
-
xrpcerr.WithTag("RepoNotFound"),
106
-
xrpcerr.WithMessage("failed to access repository"),
107
-
)
108
}
109
110
repoPath, err := securejoin.SecureJoin(x.Config.Repo.ScanPath, didRepoPath)
111
if err != nil {
112
-
return "", xrpcerr.NewXrpcError(
113
-
xrpcerr.WithTag("RepoNotFound"),
114
-
xrpcerr.WithMessage("failed to access repository"),
115
-
)
116
}
117
118
return repoPath, nil
···
101
// Construct repository path using the same logic as didPath
102
didRepoPath, err := securejoin.SecureJoin(did, repoName)
103
if err != nil {
104
+
return "", xrpcerr.RepoNotFoundError
105
}
106
107
repoPath, err := securejoin.SecureJoin(x.Config.Repo.ScanPath, didRepoPath)
108
if err != nil {
109
+
return "", xrpcerr.RepoNotFoundError
110
}
111
112
return repoPath, nil
+5
xrpc/errors/errors.go
+5
xrpc/errors/errors.go