Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] Is it possible to get a log on what failed in a view submission handler for a modal view #275

Open
spoike opened this issue Feb 12, 2024 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@spoike
Copy link

spoike commented Feb 12, 2024

Question

Is there a way to get a log during slack run on why a ViewSubmissionHandler failed using the response_action method?

It currently does not print any errors on the log output while trying to update the modal view.

Context

I'm building a step-by-step interactive modal view. In some instances I can't update a view using the following return:

return {
  response_action: "update",
  view: outputView // newly made view for the modal
};

This fails "quietly", as in there is no error in the log output. Instead the modal is not updated and the following error message is shown:

We had some trouble connecting. Try again?
Screenshot with error message

However updating the view via the client object works and it is with the exact view!

client.views.update({
  view_id: view.id, // view is the previous one from the view submission  payload
  view: outputView
})

Unfortunately the modal closes when there is no return. You can return the same thing after this Slack API Client call, the view will update but the response_action will still fail and show the error message.

Coincidentally the same view works in the BlockActionsHandler using the Slack API Client.

Environment

    "deno-slack-sdk/": "https://deno.land/x/deno_slack_sdk@2.5.0/",
    "deno-slack-api/": "https://deno.land/x/deno_slack_api@2.1.2/",
deno 1.39.4 (release, x86_64-apple-darwin)
v8 12.0.267.8
typescript 5.3.3
ProductName:            macOS
ProductVersion:         14.2.1
BuildVersion:           23C71
Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Sure thing. 🤘

@hello-ashleyintech hello-ashleyintech self-assigned this Feb 12, 2024
@hello-ashleyintech hello-ashleyintech added the question Further information is requested label Feb 12, 2024
@hello-ashleyintech
Copy link

Hi, @spoike! Thanks for your question! ✨

For general logging for your app, I recommend taking a look at this resource. This guide walks through how to use both function-level and app-level logging to troubleshoot and debug your app.

Let me know if you have additional questions or if this is not what you were looking for!

@spoike
Copy link
Author

spoike commented Feb 12, 2024

Thanks.

However I'm not asking about function-level or app-level logging. This is about getting any error log from Slack's backend (in context why the response_action method fails) for which the linked resource does not include. This could also happen to be a bug on Slack CLI.

There is an --activity-level flag for slack run but that one does not yield any error log either.

@hello-ashleyintech
Copy link

hello-ashleyintech commented Feb 12, 2024

@spoike Ah, I see! Have you tried seeing if the log appears when you run the slack activity command? This will display general app activity logs and should capture any app errors thrown by the app.

If not, then let me know and we can figure out how to get you the logs you need!

@spoike
Copy link
Author

spoike commented Feb 13, 2024

I've checked slack activity command but unfortunately no errors are logged when views fail to update.

@hello-ashleyintech
Copy link

Thanks for the update, @spoike! Let me check with the team internally to see if there's a way to log these errors, and I'll get back to you! 🙇

@hello-ashleyintech
Copy link

@spoike Quick question - is the We had some trouble connecting. Try again? error consistent or is it only happening sporadically?

@spoike
Copy link
Author

spoike commented Feb 13, 2024

It is consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants