Fix trails being unavailable when profile is private (#986)

This commit is contained in:
Flomp
2026-05-11 20:02:37 +02:00
committed by GitHub
parent ea6f5d5c95
commit c9024a4322
2 changed files with 5 additions and 1 deletions

View File

@@ -45,6 +45,9 @@ func RemoteTrailGet(e *core.RequestEvent) error {
// Construct the IRI first to see if we already know this trail.
record, err = findLocalTrailByRemoteInfo(e, ctx, handle, trailID)
if err != nil {
if errors.Is(err, federation.ErrProfilePrivate) {
return e.NotFoundError("profile is private", err)
}
return e.InternalServerError("Failed to resolve trail", err)
}