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

168
Views
How to know the object's type? Javascript

i have that print on my console.

enter image description here

enter image description here

I print this when my error function is called

export function handleRequestError(error) {
  console.log(error);
}

When I do, error.cancel, it comes undefined. Would I be able to do some verification of this type? If cancel comes, I do something like that

    export function handleRequestError(error) {
          console.log(error);
          if(error['Cancel'] === undefined) return //doesnt work
   }

How do I check that "Cancel"?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In the prototype, you can see that the property __CANCEL__ is set to true.

Do this:

export function handleRequestError(error) {
  console.log(error);
  if(error['__CANCEL__'] === undefined) return;
}
about 4 years ago · Juan Pablo Isaza Report
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!