mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-09-03 05:10:00 +03:00
fix(maloja): Fix logging objects
This commit is contained in:
+2
-2
@@ -261,14 +261,14 @@ export class MalojaApiClient extends AbstractApiClient {
|
||||
|
||||
return [scrobbleResponse, responseBody, warnStr]
|
||||
} catch (e) {
|
||||
this.logger.error(`Scrobble Error (${sType})`, { playInfo: buildTrackString(playObj), payload: scrobbleData });
|
||||
this.logger.error({ playInfo: buildTrackString(playObj), payload: scrobbleData }, `Scrobble Error (${sType})`);
|
||||
const responseError = getMalojaResponseError(e);
|
||||
if (responseError !== undefined) {
|
||||
if (responseError.status < 500 && e instanceof UpstreamError) {
|
||||
e.showStopper = false;
|
||||
}
|
||||
if (responseError.response?.text !== undefined) {
|
||||
this.logger.error('Raw Response:', { text: responseError.response?.text });
|
||||
this.logger.error({ text: responseError.response?.text }, 'Raw Response');
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
|
||||
@@ -122,7 +122,7 @@ export default class MalojaScrobbler extends AbstractScrobbleClient {
|
||||
await this.notifier.notify({ title: `Client - ${capitalize(this.type)} - ${this.name} - Scrobble Error`, message: `Failed to scrobble => ${buildTrackString(playObj)} | Error: ${e.message}`, priority: 'error' });
|
||||
throw e;
|
||||
} finally {
|
||||
this.logger.debug('Raw Payload:', scrobbleData);
|
||||
this.logger.debug(scrobbleData, 'Raw Payload');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user