spiegel_podman/pkg/api/handlers/compat
Hiroaki KAWAI d56f52c8a7
api: reflect container stats errors in HTTP status codes
Existing KillContainer handling uses HTTP status code 409 when the request cannot be performed because of the current container state. HTTP status code 404 is also used when the target container does not exist.

In contrast, errors from the stats handler are not reflected in the HTTP status code. The HTTP status code is always 200, and the errors are recorded only as generic errors in the server log.

To maintain compatibility with both streaming enabled and disabled, this change treats obtaining at least one complete unit of response content as the response contract. It then keeps the response content consistent with the HTTP status code.

Signed-off-by: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
2026-09-04 20:42:55 +09:00
..
auth.go API Handlers should not error on empty request bodies 2026-05-13 16:33:40 -04:00
changes.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers.go Merge pull request #29468 from JamesBalazs/healthcheck-fix 2026-08-20 15:42:15 -04:00
containers_archive.go Replace os.Is* error checks with errors.Is 2026-05-21 13:09:42 -07:00
containers_attach.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_create.go Merge pull request #29468 from JamesBalazs/healthcheck-fix 2026-08-20 15:42:15 -04:00
containers_export.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_logs.go api: avoid sizing logs channel from tail 2026-06-26 10:31:13 +03:00
containers_pause.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_prune.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_restart.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_start.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_stats.go api: reflect container stats errors in HTTP status codes 2026-09-04 20:42:55 +09:00
containers_stats_freebsd.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_stats_linux.go fix(api): nil check Memory.Limit before dereference in stats handler 2026-08-23 18:20:37 +04:00
containers_stats_test.go api: reflect container stats errors in HTTP status codes 2026-09-04 20:42:55 +09:00
containers_stop.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_top.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
containers_unpause.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
events.go Add reasons to all staticcheck suppressions 2026-06-12 10:12:40 +02:00
exec.go exec: honor ConsoleSize so the terminal is sized at creation 2026-06-22 10:36:10 +08:00
images.go api: Deprecate fields Container and ContainerConfig from GET /images/{name}/json 2026-07-08 17:31:02 +02:00
images_build.go build: pass ignore file to buildah to consider empty ignore files 2026-07-02 20:24:11 +05:30
images_history.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
images_prune.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
images_push.go Add reasons to all staticcheck suppressions 2026-06-12 10:12:40 +02:00
images_remove.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
images_save.go set !remote build tags where needed 2024-08-19 11:41:28 +02:00
images_search.go Docker compat v1.45 : deprecate is-automated field 2026-07-24 14:46:48 -04:00
images_tag.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
info.go info: report configured and discovered CDI devices 2026-06-01 21:45:41 +02:00
networks.go API Handlers should not error on empty request bodies 2026-05-13 16:33:40 -04:00
ping.go RUN-4538: Fix buildah vendoring 2026-04-21 14:27:58 -05:00
resize.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
secrets.go compat/secrets: do not expose secret data on inspect endpoint 2026-08-19 14:30:37 +03:30
system.go Add reasons to all staticcheck suppressions 2026-06-12 10:12:40 +02:00
types.go api/compat: switch to moby/moby 2026-03-09 11:09:23 +01:00
unsupported.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
version.go RUN-4539: Change podman module paths 2026-04-22 14:02:25 -05:00
volumes.go Merge pull request #28673 from kyounghunJang/feat/add-volume-prune-dry-run 2026-05-18 19:26:18 +02:00