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

248
Vistas
Getting error on firebase response not being in json format as postman

This is my firebase cloud function. When user get's an error, it's not being readable.

exports.finishCheckoutPayment = functions.region('southamerica-east1').runWith({
  timeoutSeconds: 60,
  memory: '8GB',
}).https.onRequest((request, response) => {
  functions.logger.log('request data', request.body)
  cors(request, response, () => {
    let headers = {
      headers: {
        'Content-Type': 'application/json',
        access_token: 'my_api_token'
      }
    }
    functions.logger.log('body asaas request', request.body)
    axios.post('https://www.asaas.com/api/v3/payments', request.body, headers).then((data) => {
      functions.logger.log('RESPONSE funcionando', data.data)
    }).catch((error) => {
      return response.status(400).send(error)
    })
  })
})

postman returns normal json error, while firebase return this shit without the important info.

enter image description here

enter image description here

What can i do to fix this error response ?!

enter image description here

about 4 years ago · Juan Pablo Isaza
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