year is not in the range [1, 9999]: 0 #2378

Closed
opened 2026-03-22 14:05:09 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @sentry[bot] on GitHub (Oct 7, 2025).

Sentry Issue: API-OSS-12

*errors.errorString: year is not in the range [1, 9999]: 0
*fmt.wrapError: could not fetch tasks, error was 'year is not in the range [1, 9999]: 0', sql: 'SELECT DISTINCT `tasks`.* FROM `tasks` WHERE (tasks.project_id IN (?)) AND tasks.`done`=? AND tasks.`due_date`>? ORDER BY tasks.`due_date` IS NULL, tasks.`due_date` asc, tasks.`id` IS NULL, tasks.`id` desc LIMIT 50', values: [308 false 0001-01-01 00:00:00 +0053 LMT]
*echo.HTTPError: code=500, message=Internal Server Error, internal=could not fetch tasks, error was 'year is not in the range [1, 9999]: 0', sql: 'SELECT DISTINCT `tasks`.* FROM `tasks` WHERE (tasks.project_id IN (?)) AND tasks.`done`=? AND tasks.`due_date`>? ORDER BY tasks.`due_date` IS NULL, tasks.`due_date` asc, tasks.`id` IS NULL, tasks.`id` desc LIMIT 50', values: [308 false 0001-01-01 00:00:00 +0053 LMT]
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 196, in 1
  File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 194, in setupSentry.func1

What makes this interesting is how the date is 0001-01-01, which is in the range from the error.

Originally created by @sentry[bot] on GitHub (Oct 7, 2025). Sentry Issue: [API-OSS-12](https://vikunja.sentry.io/issues/6145114264/?referrer=github_integration) ``` *errors.errorString: year is not in the range [1, 9999]: 0 *fmt.wrapError: could not fetch tasks, error was 'year is not in the range [1, 9999]: 0', sql: 'SELECT DISTINCT `tasks`.* FROM `tasks` WHERE (tasks.project_id IN (?)) AND tasks.`done`=? AND tasks.`due_date`>? ORDER BY tasks.`due_date` IS NULL, tasks.`due_date` asc, tasks.`id` IS NULL, tasks.`id` desc LIMIT 50', values: [308 false 0001-01-01 00:00:00 +0053 LMT] *echo.HTTPError: code=500, message=Internal Server Error, internal=could not fetch tasks, error was 'year is not in the range [1, 9999]: 0', sql: 'SELECT DISTINCT `tasks`.* FROM `tasks` WHERE (tasks.project_id IN (?)) AND tasks.`done`=? AND tasks.`due_date`>? ORDER BY tasks.`due_date` IS NULL, tasks.`due_date` asc, tasks.`id` IS NULL, tasks.`id` desc LIMIT 50', values: [308 false 0001-01-01 00:00:00 +0053 LMT] File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 196, in 1 File "/go/src/code.vikunja.io/api/pkg/routes/routes.go", line 194, in setupSentry.func1 ``` What makes this interesting is how the date is `0001-01-01`, which is in the range from the error.
GiteaMirror added the area/apiarea/filters labels 2026-03-22 14:05:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 7, 2025):

This issue has been fixed in 1b02f78, please check with the next unstable build (should be ready for deployment in ~30min, also on the demo.

@github-actions[bot] commented on GitHub (Oct 7, 2025): This issue has been fixed in [`1b02f78`](https://api.github.com/repos/go-vikunja/vikunja/commits/1b02f78eee5b3ae7f1416d0f13a92d1fbca48ec2), please check with the next unstable build (should be ready for deployment in ~30min, also on [the demo](https://try.vikunja.io).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#2378