Skip to content

Commit 14349ab

Browse files
committed
Remove commented console log and simplify error handling in backend service
1 parent d0051b9 commit 14349ab

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/core/auth/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class AuthService extends AbstractService implements OnModuleInit {
101101
const identity = await this.redis.get([this.ACCESS_TOKEN_PREFIX, payload.jti].join(':'));
102102
if (identity) {
103103
const data = JSON.parse(identity);
104-
console.log('data', data);
104+
// console.log('data', data);
105105
const success = await this.agentsService.model.countDocuments({
106106
_id: payload.identity._id,
107107
'security.secretKey': data.identity?.security?.secretKey,

src/core/backends/backends.service.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,7 @@ export class BackendsService extends AbstractQueueProcessor {
508508
$set: {
509509
state: JobState.FAILED,
510510
finishedAt: new Date(),
511-
result: {
512-
error: {
513-
message: error.message,
514-
},
515-
},
511+
result: { ...(error as any)?.response },
516512
},
517513
});
518514
}

0 commit comments

Comments
 (0)