···22 * types and logic for getting now playing information
33 */
4455-import { SpotifyApi, type AccessToken } from "@spotify/web-api-ts-sdk";
55+import {
66+ SpotifyApi,
77+ type AccessToken,
88+ type IHandleErrors,
99+} from "@spotify/web-api-ts-sdk";
610import { ProvidedAccessTokenStrategy } from "@spotify/web-api-ts-sdk";
711import { SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET } from "astro:env/server";
812···110114 return token;
111115 },
112116 ),
117117+ {
118118+ errorHandler: new (class implements IHandleErrors {
119119+ // log the error and pretend it was handled
120120+ // this way it always returns null
121121+ async handleErrors(error: any): Promise<boolean> {
122122+ console.error(error);
123123+ return true
124124+ }
125125+ })(),
126126+ },
113127);