Open kevinrobayna opened 1 year ago
Do you mean it doesn't include response_metadata
? We should, it's not on purpose.
Actually, the response metadata is present 😅
I was expecting when printing e that I'd get all the details from the error (instead I was only getting the error message)
client.views_open(
view: view,
trigger_id: request[:trigger_id]
)
rescue Slack::Web::Api::Errors::InvalidArguments => e
puts e # prints invalid_arguments
puts e.error # prints invalid_arguments
puts e.response_metadata # prints the error from slack's api
end
Closing since people can get the error details as expected I was just being silly 😅
We could change to_s
to display it.
yeah! raised a PR for it, let me know your thoughts
I see we have cassettes here https://github.com/slack-ruby/slack-ruby-client/blob/bf5bb4be3e03e9bd74d22942a61d5611f5c1d997/spec/fixtures/slack/web/views_open_error.yml#L79
but the error we get, if something fails, is just
invalid_arguments
, is this on purpose?