Returning error after a view submit
See original GitHub issueDescription
Hi all š, Hereās the flow of my app:
- The user mention the bot in any channel.
- The app replies with a welcome message and options (including āCreateā a new item)
- If the user clicks ācreateā, the app opens a modal with a form.
- If thereās no error, the app replaces the message from .2 with a feedback/overview about the item created.
Iām struggling to validate the form.
First, Iām not 100% whatās the proper method to listen for submit: app.action
with callback_id
or app.view
?
If I use app.action
it says āAn incoming event was not acknowledged before the timeout. Ensure that the ack() argument is called in your listenersā in the console and āWe had some trouble connecting. Try again?ā in the modalās header.
app.action({ callback_id: 'create' }, ({ ack }) => ack({ errors }))
If I use app.view
, the callback is fired but I can only reply with ack()
, with no error:
app.view('create', ({ ack }) => ack({ errors }));
Once the user submit the view, using the previous listener, the modal shows: āWe had some trouble connecting. Try again?ā but faster, before the 3 seconds limit. Iām assuming the ack
sent the response.
On top of all that: I have two rules to validate the form, that could be āonBlur/onChangeā: a) there a input/plain text that must to be unique (need to check the database) b) there a multi_user_select that must to have 2+ items.
I know that radio button supports this kind of āonChangeā validations. Input and selects also supports it?
What type of issue is this? (place an x
in one of the [ ]
)
- bug
- enhancement (feature request)
- question
- documentation related
- testing related
- discussion
Requirements (place an x
in each of the [ ]
)
- Iāve read and understood the Contributing guidelines and have done my best effort to follow them.
- Iāve read and agree to the Code of Conduct.
- Iāve searched for any related issues and avoided creating a duplicate issue.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Sorry by my delay. It worked.
@Falci Please let me know if you have something further to ask or discuss here. Otherwise, allow me to close this issue.
I empathize with your inconvenience with
block_actions
. However, the Bolt team doesnāt have any actions to take until the Slack Platform introduces new features related to this. š