Skip to content

Commit

Permalink
Add some logs to troubleshoot in production.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbinf committed Feb 14, 2023
1 parent 2cc8b2f commit b8d2382
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion edge-src/models/FeedDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ export default class FeedDb {
let res;
try {
console.log('Trying to update...');
console.log(settings);
res = await this.getUpdateSql(
'settings',
{
Expand All @@ -369,8 +370,15 @@ export default class FeedDb {
data: JSON.stringify(settings[category]),
},
).run();
console.log('finished updating successfully')
} catch (error) {
console.log('Failed to update for ', category, error);
try {
console.log('Failed to update for ', category, error);
} catch (e) {
console.log('exception inside catch for update')
}
} finally {
console.log('finally for update')
}
try {
console.log('Trying to insert...', category);
Expand Down

0 comments on commit b8d2382

Please sign in to comment.