Skip to content

The only tool you need to know what is happening and how to fix it.

fix: 500 when no records

dduxb5febc780b72
diff --git a/backend/app/repositories/endpoint.repository_sqlite.go b/backend/app/repositories/endpoint.repository_sqlite.go
index f0b2efc1..b2ec0024 100644
--- a/backend/app/repositories/endpoint.repository_sqlite.go
+++ b/backend/app/repositories/endpoint.repository_sqlite.go
@@ -4,6 +4,7 @@ package repositories
import (
"context"
+ "database/sql"
"fmt"
"math"
"sort"
@@ -735,7 +736,7 @@ func (e *endpointRepository) GetSlowEndpoint(ctx context.Context, projectId uuid
return 0, "", err
}
if result == nil {
- return 0, "", fmt.Errorf("not found")
+ return 0, "", sql.ErrNoRows
}
return result.OffsetMs, result.Reason, nil
}