Skip to content

Commit bba3595

Browse files
committed
improve error logging structure in Slack, Qualification, and Rate services
1 parent 935cbf9 commit bba3595

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/apps/job-launcher/server/src/common/utils/slack.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ export async function sendSlackNotification(
2222
slackLogger.debug('Slack notification sent', payload);
2323
return true;
2424
} catch (error) {
25-
slackLogger.error(
26-
'Error sending Slack notification',
27-
formatAxiosError(error),
28-
);
25+
slackLogger.error('Error sending Slack notification', {
26+
error: formatAxiosError(error),
27+
});
2928
return false;
3029
}
3130
}

packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class QualificationService {
5252
const formattedError = formatAxiosError(error);
5353
this.logger.error(
5454
'Error fetching qualifications from reputation oracle',
55-
formattedError,
55+
{ error: formattedError },
5656
);
5757
throw new ServerError(ErrorQualification.FailedToFetchQualifications);
5858
}

packages/apps/job-launcher/server/src/modules/rate/rate.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class RateService {
8282
this.logger.error('Error while getting rate', {
8383
from,
8484
to,
85-
formattedError,
85+
error: formattedError,
8686
});
8787
throw new NotFoundError(ErrorCurrency.PairNotFound);
8888
}

0 commit comments

Comments
 (0)