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
Make the package search API throw an UnsupportedOperation error if request returns 404 #373
Conversation
spec/connect/errors_spec.rb
Outdated
|
||
describe '.message' do | ||
it 'returns the http message' do | ||
expect(described_class.new(with_http_message).message).to eq 'foo' |
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 would use parentheses here and below
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 had too open this pull request which is based on #372 against master
since prophet does not allow any other branches as base branch!
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.
So its fixed!
lib/suse/connect/api.rb
Outdated
rescue ApiError => e | ||
raise e if e.code != 404 | ||
raise UnsupportedOperation, 'Package search is not supported by the '\ | ||
'registration proxy: Alternatively checkout'\ |
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.
s/Alternatively checkout/Alternatively, use/
end | ||
end | ||
|
||
context 'not working host' do |
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.
👍
spec/connect/errors_spec.rb
Outdated
) | ||
end | ||
|
||
describe '.code' do |
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.
#code
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.
is already fixed in the other PR. I had to open the pull request against master
otherwise prophet is not running :)
spec/connect/errors_spec.rb
Outdated
end | ||
end | ||
|
||
describe '.message' do |
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.
#message
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.
see above
456b819
to
588d9fb
Compare
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.
lgtm modulo minor changes
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.
lgtm
Well Done! Your tests are still passing. |
No description provided.