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

300
Visualizações
Slack Bolt API: Receiving 'not_found' error when trying to update modal view on submission

So I have this app where I click a button and it begins a series of modals to take user input. I am having an issue when trying to update the current modal with a new view object.

I can update and push new views no problem when responding to other buttons within a modal but not when it's the submission button. Unfortunately when using input blocks you must include a submission button.

Here is the code I am using to handle the view_submission payload I receive when clicking submit.

app.view('callback_period', async ({ ack, body, view, client }) => { // Pass callback_id
  // Acknowledge the view_submission event
  await ack();

  // Log out view ID to confirm it is indeed the same as the initial view
  try {
    console.log(body.view.id);
    const result = await client.views.update({
      response_action: "update",
      view_id: body.view.id,
      hash: body.view.hash,
      view: views_payroll_prefill_shift
    });
    console.log(result);
    console.log(body.view.id);
  }
  catch (error) {
    console.error(error);
    console.log(body.view.id);
  }

}); 

So when I click the button my app receives the payload just fine but the client.views.update method just gives me a "not_found" error. I checked the documentation and it says the view_id must be invalid however I've logged the view ID from the original modal and it is consistent throughout. I don't understand why it's working for app.actions() but not app.view().

I've tried creating const for the original body.view.id and passing that but I will keep getting this not_found error from app.views().

I'm really at my wits end. Any help would be greatly appreciated.

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

0

So after some more digging I finally found my answer. You need to pass the updated view as arguments during your acknowledgement. When the submission button is pressed you pass along the response action and your view inside ack(). Here is the solution;

app.view('callback_period', async ({ ack, view}) => { // Pass callback_id
  // Acknowledge the view_submission event
  await ack({
    "response_action": "update",
    "view": views_payroll_prefill_shift,
  });
}); 
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