moby/registry
Sebastiaan van Stijn 4c03618fab
registry: remove jsonmessage dependency
Just return a regular error, because the API converts the error to
the expected ErrorResponse. Before/After produce the same API response:

    curl -v --unix-socket /var/run/docker.sock 'http://localhost/v1.43/images/search?term=hello'
    *   Trying /var/run/docker.sock:0...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > GET /v1.43/images/search?term=hello HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.74.0
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 500 Internal Server Error
    < Api-Version: 1.44
    < Content-Type: application/json
    < Docker-Experimental: false
    < Ostype: linux
    < Server: Docker/dev (linux)
    < Traceparent: 00-c38c2da5cf30305fcb66836a28e227bf-d16f4f7d2c7002a1-01
    < Date: Mon, 18 Sep 2023 14:30:18 GMT
    < Content-Length: 41
    <
    {"message":"Unexpected status code 409"}
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-18 16:35:45 +02:00
..
resumable Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
auth.go registry: ResolveAuthConfig: rename var that collided with import 2023-08-29 16:45:18 +02:00
auth_test.go registry: use types/registry.AuthConfig 2022-07-29 23:05:20 +02:00
config.go migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
config_test.go runconfig, oci, image, layer, distribution: fix empty-lines (revive) 2022-09-28 01:58:52 +02:00
config_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
config_windows.go all: replace strings.Replace with strings.ReplaceAll 2022-05-09 19:45:40 +08:00
errors.go registry: return "errdefs" compatible error types 2022-03-17 17:12:13 +01:00
registry.go registry: move search-related code to separate files 2023-08-29 16:45:43 +02:00
registry_mock_test.go Switch all logging to use containerd log pkg 2023-06-24 00:23:44 +00:00
registry_test.go migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
search.go registry: move search-related code to separate files 2023-08-29 16:45:43 +02:00
search_endpoint_v1.go registry: move search-related code to separate files 2023-08-29 16:45:43 +02:00
search_endpoint_v1_test.go registry: move search-related code to separate files 2023-08-29 16:45:43 +02:00
search_session.go registry: remove jsonmessage dependency 2023-09-18 16:35:45 +02:00
search_test.go registry: move search-related code to separate files 2023-08-29 16:45:43 +02:00
service.go migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00
service_v2.go registry: deprecate APIEndpoint.Version and APIVersion type 2023-08-29 12:49:46 +02:00
types.go migrate to new github.com/distribution/reference module 2023-09-05 12:09:26 +02:00