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

288
Views
Detectar un error de axios.get() cuando los bytes devueltos superan 1 GB

Estoy usando axios para hacer una solicitud http GET. En algunas situaciones, mi servidor devuelve más de un GB de datos y provoca un error. Para una solución a corto plazo, quiero detectar el error y registrarlo; sin embargo, me resulta difícil detectar el error. Usando un .catch mencionado aquí , y en la documentación de axios , todavía no puedo detectar el error.

Error

 buffer.js:776 return this.utf8Slice(start, end); ^ Error: Cannot create a string longer than 0x3fffffe7 characters

Solicitudes de ejemplo / Lo que he probado

 // without a catch const res = await axios.get<string, AxiosResponse<Record<string, any>>>("http://foo.bar/huge_string_response"); // with a catch, still throws const res = await axios .get<string, AxiosResponse<Record<string, any>>>("http://foo.bar/huge_string_response") .catch((err) => {console.log("error: " + err); });
about 4 years ago · Juan Pablo Isaza
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!