Skip to content

Commit

Permalink
fix: added error object to log message
Browse files Browse the repository at this point in the history
  • Loading branch information
JanssenBrm committed Dec 2, 2024
1 parent 411f5a2 commit 264b4a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/jobs/controllers/jobs/jobs.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export class JobsController {
try {
return (await this.databaseService.queryJobs(query)) as Job[];
} catch (error: any) {
this.logger.error(`Could not query jobs`, error, JobsController.name);
this.logger.error(
`Could not query jobs: ${JSON.stringify(error)}`,
error,
JobsController.name,
);
throw new InternalServerErrorException(
`Could not query jobs: ${error.message}`,
);
Expand Down

0 comments on commit 264b4a2

Please sign in to comment.