Handle errors for Anilist, Lastfm, and Speedruncom Infos (#4)

Also make the client automatically request every 2 minutes an update for Last.fm
Also lightly change the `AnimateHeight` of `Info` (for the sake of the top border and better looks when multiple websites in one category)
This commit is contained in:
Taevas 2024-05-01 21:10:00 +02:00
parent dad037bed0
commit d9991ac0e7
5 changed files with 58 additions and 27 deletions

View file

@ -45,14 +45,6 @@ const handler: Handler = async () => {
},
}),
});
if (anilist.status !== 200) {
// log the issue in netlify, return 404 to the user anyway
console.log(await anilist.json());
return {
statusCode: 404,
body: "",
};
}
const json = (await anilist.json() as any).data.MediaList;
const anime: AnilistInfo = {