Handle errors for Anilist
, Lastfm
, and Speedruncom
Info
s (#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:
parent
dad037bed0
commit
d9991ac0e7
5 changed files with 58 additions and 27 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue