-
Notifications
You must be signed in to change notification settings - Fork 20
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
Generic HTTP adapter [THREESCALE-2665] #196
Conversation
fa80beb
to
9a169a2
Compare
fc1d8de
to
831ae06
Compare
831ae06
to
6215519
Compare
|
||
raise InvalidResponseError, { response: response, message: body } unless response.ok? | ||
|
||
params = body.try(:to_h) or return # no need to create client if there are no attributes |
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.
If the content-type is NULL_TYPE
, body
will be a String
https://github.com/3scale/zync/pull/196/files#diff-cbd4720b5437174ca7b9bcc0a46568adR99
Probably you want to return nil
then it is fine
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.
Which is fine, because it will return nil
and return.
|
||
adapter = GenericAdapter.new('http://id:secret@lvh.me:3000/auth/realm/name') | ||
|
||
begin |
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.
Without begin/rescue
error = assert_raises GenericAdapter::OIDC::AuthenticationError do
adapter.test
end
assert_kind_of Faraday::TimeoutError, error.cause
assert error.bugsnag_meta_data.presence
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.
I'll revert your d34e9d1. Feel free to apply those changes when they are working. But I need to merge & deploy this.
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.
Fair enough, I will work on it
d34e9d1
to
60a191b
Compare
60a191b
to
ac2eaec
Compare
An adapter implementing 1228d79 protocol.
Depends on 3scale/porta#829