Closed lindapaiste closed 4 months ago
Hi @lindapaiste! Just wanted to share some of the server logs I found during the days that peaked in errors. I noticed that during those times, the server would restart more frequently and that these two errors would show up mostly around those moments:
Error 1
Error 2
Based on the first image, I think it's coming from comparePassword
in the user.js
file? Or maybe from removing the return
on line 51 in passport.js
?
I also have a two more screenshots of other logs when the server restarts from two different days. I hope this was able to provide some context but let me know if you need more logs or other info here, thanks!!!
Log from 03/22/24
Log from 03/24/24
Ref #521
Changes:
async
/await
syntax.async.waterfall()
chaining.random
togenerateToken
and make itaysnc
.comparePassword
beasync
, with a minor change to thepassport.js
file to support this.Limitations:
await mail.send(mailOptions);
as this function returns aPromise
, but the mail class doesn't handle errors correctly and willresolve
instead ofreject
. I will fix this in an additional PR.try
/catch
blocks, while others will throw the error and reject the promise. I basically kept the same amount of error handling on each function as was there before.I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123