distribution/registry/client
Sebastiaan van Stijn c8ba5d7081
registry/client: combine SuccessStatus and HandleErrorResponse
The SuccessStatus acted on the response's status code, and was used to return
early, before checking the same status code with HandleErrorResponse.

This patch combines both functions into a HandleHTTPResponseError, which
returns an error for "non-success" status-codes, which simplifies handling
of responses, and makes some logic slightly more idiomatic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-08 14:40:41 +02:00
..
auth registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
transport Support ztsd compression as Content-Encoding 2023-06-01 14:06:25 +01:00
blob_writer.go registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
blob_writer_test.go Dont parse errors as JSON unless Content-Type is set to JSON 2023-08-28 12:35:33 +01:00
errors.go registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
errors_test.go registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
repository.go registry/client: combine SuccessStatus and HandleErrorResponse 2023-09-08 14:40:41 +02:00
repository_test.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00