Skip to content
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

Merged
merged 4 commits into from Jun 11, 2018

Conversation

felixsch
Copy link
Contributor

@felixsch felixsch commented Jun 7, 2018

No description provided.

@felixsch felixsch closed this Jun 7, 2018
@felixsch felixsch changed the base branch from master to add-error-message-fallback June 7, 2018 11:54
@felixsch felixsch reopened this Jun 7, 2018
@felixsch felixsch changed the base branch from add-error-message-fallback to master June 7, 2018 11:56

describe '.message' do
it 'returns the http message' do
expect(described_class.new(with_http_message).message).to eq 'foo'
Copy link
Contributor

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

Copy link
Contributor Author

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So its fixed!

rescue ApiError => e
raise e if e.code != 404
raise UnsupportedOperation, 'Package search is not supported by the '\
'registration proxy: Alternatively checkout'\
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

)
end

describe '.code' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#code

Copy link
Contributor Author

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 :)

end
end

describe '.message' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

@SUSE SUSE deleted a comment from suse-tests-pass Jun 11, 2018
Copy link
Contributor

@wstephenson wstephenson left a 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

Copy link
Contributor

@wstephenson wstephenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@SUSE SUSE deleted a comment from suse-tests-pass Jun 11, 2018
@suse-tests-pass
Copy link
Collaborator

Well Done! Your tests are still passing.
https://ci.suse.de/job/SCC-Connect-Prophet/121055/console
If the given link has expired,you can force a Prophet rerun by just deleting this comment. (Merged 588d9fb into 272bbbb)

@felixsch felixsch merged commit 21da98e into master Jun 11, 2018
@lagartoflojo lagartoflojo deleted the add-unsupported-operation branch October 14, 2019 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants