-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle 404 during validator calls by skipping campaign #157
base: master
Are you sure you want to change the base?
Conversation
@ivopaunov @rori4 can you review this? |
let dataLeader | ||
let dataFollower | ||
let dataLatestNewState | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use await Promise.all([...])
inside try catch or Promise.all([ ... ].map(pr => pr.catch(...)))
. You can detect the the failed request but they will be send in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it with Promise.all
at handleValidatorCalls
status-loop/queryValidators.js
Outdated
let dataLeader | ||
let dataFollower | ||
let dataLatestNewState | ||
try { | ||
dataLeader = await getRequest(leaderUrl) | ||
;[dataLeader, dataFollower, dataLatestNewState] = await Promise.all([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the semicolon and log the catch error
8ca0186
to
3155e4d
Compare
fixes #148