You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
List endpoints return 500 on PostgreSQL when the cursor is not a valid id #8889
Same bug as #8879, in the other paginated lists. An invalid cursor decodes to an empty array, Sequelize renders the cursor clause as id < '' or id > '', and PostgreSQL rejects it with invalid input syntax for type integer: "". SQLite returns an empty page.
Affected finders and routes:
Notification.forUser: GET /api/v1/user/notifications
User.getAll: GET /api/v1/users
ProjectType.getAll: GET /api/v1/project-types
ProjectTemplate.getAll: GET /api/v1/templates
DeviceGroup.getAll: team and application device group lists
BrokerCredentials.byTeam: team broker client list
Expected Behavior
An invalid cursor returns 400 invalid_cursor on every list, as the audit log does since #8879.
Steps To Reproduce
Run the platform against PostgreSQL.
GET /api/v1/user/notifications?cursor=abc.
The response is a 500 with invalid input syntax for type integer: "".
Suggested Fix
Move decodeCursor from the AuditLog model to the shared model setup next to decodeHashid, and use it in each of these finders.
Activity