zalando-stups / pierone-cli

DEPRECATED: Convenient command line client for STUPS' Pier One Docker registry
http://docs.stups.io/en/latest/components/pierone.html#command-line-client
Other
10 stars 13 forks source link

Improve HTTP error handling #54

Closed PetrGlad closed 7 years ago

PetrGlad commented 7 years ago

Errors in call to pierone.api.request were handled inconsistently or not handled at all in some cases. This lead to hard to understand error messages/stack traces that were caused by HTTP errors. In some cases error messages were outright misleading as message "Image not found" actually meant "Cannot process at the moment". Thus reporting images that do present in repository as missing.

This version strives not not hide or obfuscate errors in case they are not handled explicitly.

Further improvement could be to print exception's stack trace only with --verbose flag defaulting to exception's message only.

PetrGlad commented 7 years ago

I just noticed that this PR might intersect with #50 Still both are necessary

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.08%) to 82.294% when pulling 8ebcdb739e03e1978ec88c4ce378a0d34c2b9f87 on PetrGlad:improve-http-error-handling into bfe1687bf0d03327a4707461b7b90c6943e15eed on zalando-stups:master.

hjacobs commented 7 years ago

Can you fix the coverage?

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 8afe422028733a3595c12887976c4475195a971b on PetrGlad:improve-http-error-handling into on zalando-stups:master.

hjacobs commented 7 years ago

:+1: