Skip to content

Commit

Permalink
Improve error logging (google home + instance get access token) (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Oct 11, 2024
1 parent bccc591 commit c52274c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/api/google/google.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module.exports = function GoogleHomeModel(logger, db, redisClient, jwtService) {
});
} catch (e) {
const status = get(e, 'response.status');
logger.error(`GOOGLE_HOME_REPORT_STATE_ERROR, user = ${users[0].id}, status = ${status}`);
logger.debug(`GOOGLE_HOME_REPORT_STATE_ERROR, user = ${users[0].id}, status = ${status}`);
if (status !== 404) {
logger.info(get(e, 'response.data'));
logger.info(payloadCleaned);
Expand Down
2 changes: 1 addition & 1 deletion core/api/instance/instance.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = function InstanceModel(logger, db, redisClient, jwtService, fin

// the instance doesn't exist or has been deleted
if (instanceInDb === null) {
throw new ForbiddenError();
throw new ForbiddenError(`Instance ${instance.id} doesn't exist or has been deleted.`);
}

const accessToken = jwtService.generateAccessTokenInstance(instanceInDb);
Expand Down

0 comments on commit c52274c

Please sign in to comment.