Fix uncaught error when invalid date is supplied to API (#19480)
Fix uncaught error when invalid date is supplied to API (#19480)

Fix #19213
MitarashiDango/mastodon,im-in-space/mastodon,im-in-space/mastodon,maa123/mastodon,yukimochi/mastodon,masto-donte-com-br/mastodon,yukimochi/mastodon,MitarashiDango/mastodon,maa123/mastodon,theoria24/mastodon,masto-donte-com-br/mastodon,Ryanaka/mastodon,Ryanaka/mastodon,im-in-space/mastodon,gol-cha/mastodon,theoria24/mastodon,yukimochi/mastodon,maa123/mastodon,gol-cha/mastodon,maa123/mastodon,theoria24/mastodon,glitch-soc/mastodon,glitch-soc/mastodon,Ryanaka/mastodon,yukimochi/mastodon,im-in-space/mastodon,glitch-soc/mastodon,masto-donte-com-br/mastodon,masto-donte-com-br/mastodon,glitch-soc/mastodon,gol-cha/mastodon,MitarashiDango/mastodon,Ryanaka/mastodon,gol-cha/mastodon,theoria24/mastodon,MitarashiDango/mastodon