From 8616e87845dc57c7211e13652a036a640261c866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Wed, 2 Oct 2024 08:18:47 +0200 Subject: [PATCH] fixing a copy paste issue which caused lots of warnings --- lib/docker/api.ex | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/docker/api.ex b/lib/docker/api.ex index b66315b..3286054 100644 --- a/lib/docker/api.ex +++ b/lib/docker/api.ex @@ -26,7 +26,7 @@ defmodule Testcontainers.Docker.Api do "label" => ["#{Testcontainers.Constants.container_reuse_hash_label}=#{hash}"] } |> Jason.encode!() case Api.Container.container_list(conn, filters: filters_json) do - {:ok, containers} -> + {:ok, containers} when is_list(containers) -> case containers do [] -> {:error, :no_container} @@ -40,12 +40,6 @@ defmodule Testcontainers.Docker.Api do {:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} -> {:error, {:failed_to_get_container, error}} - - {:error, %Tesla.Env{status: other}} -> - {:error, {:http_error, other}} - - {:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} -> - {:error, {:failed_to_get_container, error}} end end