Skip to content

Commit fb5ffd0

Browse files
committed
fix(lastfm): Fix network error default value
1 parent 0c04e7b commit fb5ffd0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/common/vendor/LastfmApiClient.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const badErrors = [
2121
'api key suspended',
2222
'invalid session key',
2323
'invalid api key',
24-
'authentication failed'
24+
'authentication failed',
25+
'invalid parameters'
2526
];
2627

2728
const retryErrors = [
@@ -120,7 +121,7 @@ export default class LastfmApiClient extends AbstractApiClient {
120121
} = e;
121122
// for now check for exceptional errors by matching error code text
122123
const retryError = retryErrors.find(x => message.toLocaleLowerCase().includes(x));
123-
let networkError = null;
124+
let networkError = undefined;
124125
if(retryError === undefined) {
125126
const nError = getNodeNetworkException(e);
126127
if(nError !== undefined) {

0 commit comments

Comments
 (0)