diff --git a/pkg/service/service.go b/pkg/service/service.go index 72abde2..36e9171 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -25,6 +25,9 @@ type Service struct { // Used for common default response. func (svc *Service) NewError(ctx context.Context, err error) *api.ErrorStatusCode { status := 500 + if errors.Is(err, datastore.ErrNotExist) { + status = 404 + } if errors.Is(err, ErrPermissionDenied) { status = 403 }