Skip to content

Fix 500 error on decklists/by_date for days with no decklists#363

Open
jwstover wants to merge 1 commit into
zzorba:masterfrom
jwstover:fix/by-date-empty-500
Open

Fix 500 error on decklists/by_date for days with no decklists#363
jwstover wants to merge 1 commit into
zzorba:masterfrom
jwstover:fix/by-date-empty-500

Conversation

@jwstover

Copy link
Copy Markdown

listDecklistsByDateAction computed max() over the decklists' update dates to set the Last-Modified header, but max() fails on an empty array, so any date with zero published decklists returned HTTP 500 instead of an empty result. Skip the Last-Modified handling when the day is empty and return an empty JSON array with status 200.

listDecklistsByDateAction computed max() over the decklists' update
dates to set the Last-Modified header, but max() fails on an empty
array, so any date with zero published decklists returned HTTP 500
instead of an empty result. Skip the Last-Modified handling when the
day is empty and return an empty JSON array with status 200.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant