Bolt-js: How to send error message back to modal

Created on 9 Dec 2019  路  4Comments  路  Source: slackapi/bolt-js

Description

I have a view_submission endpoint in my bolt app, and I want to send an error back to the modal if the user selected a date in the past on the modal's date picker. The slack api docs suggest responding to the payload with a response_action of errors, however I am thoroughly confused how to do this.

My bolt code currently looks like:

app.view('modal', async ({ ack }) => {
 ack()
 // send errors back
}

If anyone could help or point to any documentation it would be greatly appreciated.

I see that this issue creates a workaround for typescript, but I'm not sure how to adjust it for javascript?

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [ ] enhancement (feature request)
  • [x] question
  • [ ] documentation related
  • [ ] testing related
  • [x] discussion

Requirements (place an x in each of the [ ])

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.
question

Most helpful comment

Thanks for flagging this. If I understand it correctly, this seems to relate to https://github.com/slackapi/bolt/issues/305

All 4 comments

Thanks for flagging this. If I understand it correctly, this seems to relate to https://github.com/slackapi/bolt/issues/305

Yes thank you! Also to be clear, as I said in #305 , I'm not using typescript

@jacklein Can we close this issue now?

Solution was provided here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dschinkel picture dschinkel  路  4Comments

selfcontained picture selfcontained  路  4Comments

dginovker picture dginovker  路  4Comments

st3fan picture st3fan  路  3Comments

i-break-codes picture i-break-codes  路  4Comments