Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
unhandled promise rejection node.js

I think I'm missing something small. I keep getting UnhandledPromiseRejectionWarning. I've been combing mdn as well as SO for answers, I need another set of eyeballs on my code.

Thanks

calling promise

proxySvc.setIfElite(proxy)
  .then(success => {
    console.log(success.msg)
  })
  .catch(err => {
    console.error(err.msg)
});

Promise Method

proxySvc.setIfElite = function (P) {
//
return new Promise((resolve, reject) => {
    ProxyVerifier.testAnonymityLevel(P, (error, anonymityLevel) => {
  setCounter();
  if (error || anonymityLevel !== 'elite') {
    reject({
      status: false,
      msg: 'test failure'
    })
  };

 resolve({
      status: true,
      msg: P.ipAddress
    });
 });

})

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!