Improve 'item not found' pages (#3438)

* Make scene 'not found' page consistent
* Make backend response for no result consistent
This commit is contained in:
DingDongSoLong4
2023-02-16 01:12:01 +02:00
committed by GitHub
parent a1e7f8940b
commit 8437e10027
9 changed files with 54 additions and 35 deletions

View File

@@ -2,6 +2,8 @@ package api
import (
"context"
"database/sql"
"errors"
"strconv"
"github.com/stashapp/stash/pkg/models"
@@ -16,7 +18,7 @@ func (r *queryResolver) FindPerformer(ctx context.Context, id string) (ret *mode
if err := r.withReadTxn(ctx, func(ctx context.Context) error {
ret, err = r.repository.Performer.Find(ctx, idInt)
return err
}); err != nil {
}); err != nil && !errors.Is(err, sql.ErrNoRows) {
return nil, err
}