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

145
Visualizações
Parsing nested JSON from aws SNS message

I'm having trouble returning errorMessage from this nested JSON response I get from an aws SNS message. Part of the problem, I think, is the weird spaces and formatting this is returned in. I parsed the whole thing once to get message which I'm able to return values like executionIdfrom, but JSON.parse(message.errorData) already throws me an error before I can continue downward to -> Cause -> errorMessage.

{"executionId":"<<ARN REDACTED>>","stateName":"9b44bafc-d542-4533-8091-5c9a2bfd9983","startTime":"2022-04-07T16:20:59.350Z","sourceStepFunction":"<<REDACTED>>","errorData":{"Error":"Error","Cause":"{\"errorType\":\"Error\",\"errorMessage\":\"Request failed with status code 400\",\"trace\":[\"Error: Request failed with status code 400\",\"    at e.exports (/var/task/index.js:2:69443)\",\"    at e.exports (/var/task/index.js:2:71859)\",\"    at IncomingMessage.<anonymous> (/var/task/index.js:2:62409)\",\"    at IncomingMessage.emit (events.js:412:35)\",\"    at IncomingMessage.emit (domain.js:475:12)\",\"    at endReadableNT (internal/streams/readable.js:1334:12)\",\"    at processTicksAndRejections (internal/process/task_queues.js:82:21)\"]}"}}
about 4 years ago · Santiago Gelvez
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