Changelog-updated: api will now return an error when an invalid cursor
is given.
Changelog-updated: api version bumped to 0.11.3
---
Annoying abusers having fun sending me error emails
api/graph/model/cursor.go | 6 ++----
api/graph/schema.resolvers.go | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/api/graph/model/cursor.go b/api/graph/model/cursor.go
index 644c56e..3e04a20 100644
--- a/api/graph/model/cursor.go
+++ b/api/graph/model/cursor.go
@@ -29,10 +29,8 @@ func (c *Cursor) UnmarshalGQL(v any) error {
if plain == nil || err != nil {
return fmt.Errorf("Invalid cursor")
}
- err = json.Unmarshal(plain, c)
- if err != nil {
- // This is guaranteed to be a programming error
- panic(err)
+ if err = json.Unmarshal(plain, c); err != nil {
+ return fmt.Errorf("Invalid cursor")
}
return nil
}
diff --git a/api/graph/schema.resolvers.go b/api/graph/schema.resolvers.go
index f4990c3..9610a1d 100644
--- a/api/graph/schema.resolvers.go
+++ b/api/graph/schema.resolvers.go
@@ -5127,7 +5127,7 @@ func (r *queryResolver) Version(ctx context.Context) (*model.Version, error) {
return &model.Version{
Major: 0,
Minor: 11,
- Patch: 2,
+ Patch: 3,
DeprecationDate: nil,
}, nil
}
--
2.52.0