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

207
Visualizações
Unable to catch Network Error when sending request using Inertia + Vue

While sending a this.$inertia.patch request I'm unable to catch a Network Error. I'm turning off the backend server to emulate a lost connection. The console shows: Uncaught (in promise) Error: Network Error.

I've tried Inertia's onError, tried adding a .catch after the request as well as a separate try...catch and used the Vue 2's

errorCaptured: function(err) {
   console.log('Caught error', err.message)
},

I can give more details if needed.

So basically trying to catch net::ERR_CONNECTION_REFUSED

Edit: I moved to using onFinish along with onSuccess and onStart, but finally used axios

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use onStart along with onSuccess and onFinish:

  • In the case of a network error, onFinish will trigger without onSuccess.
  • In the case of a server error onError will trigger with onFinish
about 4 years ago · Juan Pablo Isaza Relatório
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