Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

324
Vistas
Getting UnhandledPromiseRejectionWarning: Error: write EPROTO when running my async await function in NodeJS

I was running the below code without any issue up until this afternoon, I did not change or update anything, not sure what is causing this:

async function getStocks(){

    const { data } = await axios.get('https://gist.githubusercontent.com/graffixnyc/8c363d85e61863ac044097c0d199dbcc/raw/7d79752a9342ac97e4953bce23db0388a39642bf/stocks.json')
    return data // this will be the array of people objects
}

async function abc(){
    let a = await getStocks()
    console.log(a)
}

abc()

It used to render the entire data from the JSON file but now throws the below error:

(node:1860) UnhandledPromiseRejectionWarning: Error: write EPROTO 14520:error:1408F10B:SSL ` 
routines:ssl3_get_record:wrong version 
number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:`

I am not sure which dependency has the wrong version since I did not update the code nor made any changes.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The data on the website sent an invalid response, so the issue was not in the code but the website data itself.

about 4 years ago · Juan Pablo Isaza Denunciar

0

Try adding Try Catch to your functions.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda