-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add response_metadata to Web API errors #311
Changes from all commits
006556c
6ad67f0
02d9b06
e0038b4
da2a792
423e469
2c9671c
fdc277a
64ca245
1ee90a2
2f5d83c
1ad0e8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ class Client | |
|
||
def initialize(options = {}) | ||
Slack::Web::Config::ATTRIBUTES.each do |key| | ||
send("#{key}=", options[key] || Slack::Web.config.send(key)) | ||
send("#{key}=", options.fetch(key, Slack::Web.config.send(key))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This turned out to not be directly relevant, but I noticed that if there was a truthy value in the config that it could not be overridden with a falsey value. |
||
end | ||
@logger ||= Slack::Config.logger || Slack::Logger.default | ||
@token ||= Slack.config.token | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of a horrible name. I used it because it's the name of the field in the response body, but I'm open to changing it. One alternative is
error_code
(anderror_codes
below).