We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61c6ca2 commit 31f5b4bCopy full SHA for 31f5b4b
1 file changed
src/api-request.ts
@@ -91,9 +91,9 @@ export class LastFMApiRequest<T> {
91
92
httpRequest.end();
93
}).then(([response, content]) => {
94
- if (response.headers['content-type'] !== 'application/json') {
+ if (!response.headers['content-type']?.includes('application/json')) {
95
throw new LastFMResponseError(
96
- `lastfm-ts-api: Expected JSON response but received '${response.headers['content-type']}'`,
+ `lastfm-ts-api: Expected JSON response ('application/json') but received '${response.headers['content-type']}'`,
97
{ response, content }
98
);
99
}
0 commit comments