Skip to content

Error details aren't passed through #482

Open

Description

@kevinrobayna

I see we have cassettes here

string: '{"ok":false,"error":"invalid_arguments","response_metadata":{"messages":["[ERROR]

but the error we get, if something fails, is just invalid_arguments, is this on purpose?

Activity

  1. dblock commented on Jun 22, 2023

    @dblock
    Collaborator

    Do you mean it doesn't include response_metadata? We should, it's not on purpose.

  2. kevinrobayna commented on Jun 22, 2023

    @kevinrobayna
    Author

    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
    
  3. kevinrobayna commented on Jun 22, 2023

    @kevinrobayna
    Author

    Closing since people can get the error details as expected I was just being silly 😅

  4. dblock commented on Jun 23, 2023

    @dblock
    Collaborator

    We could change to_s to display it.

  5. kevinrobayna commented on Jun 23, 2023

    @kevinrobayna
    Author

    yeah! raised a PR for it, let me know your thoughts

    #483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions