Skip to content

Commit bee35d9

Browse files
committed
Stringify error messages from Spotify API
1 parent 9f36650 commit bee35d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spotify-api-wrapper.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class SpotifyApiWrapper {
111111
this.spotifyApi.setAccessToken(data.body['access_token']);
112112
this.spotifyApi.setRefreshToken(data.body['refresh_token']);
113113
} catch (err) {
114-
this.log.error('Could not authorize Spotify:\n\n', err);
114+
this.log.error('Could not authorize Spotify:\n\n', JSON.stringify(err));
115115
}
116116
}
117117

@@ -178,7 +178,7 @@ export class SpotifyApiWrapper {
178178
}
179179

180180
const errorMessage = isWebApiError ? (error as WebapiError).body : error;
181-
this.log.error('Unexpected error when making a request to Spotify:', errorMessage);
181+
this.log.error('Unexpected error when making a request to Spotify:', JSON.stringify(errorMessage));
182182
}
183183
}
184184
}

0 commit comments

Comments
 (0)