Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
Uncaught TypeError: Cannot read properties of null (reading 'variations')

I have my chrome extension listing errors on the extensions tab, but it's not completing the code that i'm using the try/catch.

In this code if the responseText does not contain ant variations, chrome shows the Uncaught TypeError, but does NOT run the catch console.log

try{
   $price_test =http.responseText;
   var txt = http.response;
   var obj = JSON.parse(txt);
   var prueba = obj.result.variations[0];
}catch (error) {
   console.log('error')
}

How can i get the try/catch to actualy catch the error instead of chrome stoping the code there.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda