-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
defmodule KubernetesHealthCheck.Plug do | ||
@moduledoc false | ||
if Code.ensure_loaded?(Plug) do | ||
@moduledoc """ | ||
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (24, 1.13.4)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (24, 1.14.5)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (24, 1.15.7)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (25, 1.13.4)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (25, 1.14.5)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (25, 1.15.7)
Check warning on line 4 in lib/kubernetes_health_check/plug.ex GitHub Actions / Run tests (26, 1.15.7)
|
||
Plug to return health check results. | ||
|
@@ -76,7 +77,8 @@ defmodule KubernetesHealthCheck.Plug do | |
|> halt() | ||
|
||
{:error, {status_code, reason}} when is_integer(status_code) -> | ||
send_resp(conn, status_code, inspect(reason)) | ||
conn | ||
|> send_resp(status_code, inspect(reason)) | ||
|> halt() | ||
|
||
{:error, reason} -> | ||
|
@@ -95,7 +97,8 @@ defmodule KubernetesHealthCheck.Plug do | |
|> halt() | ||
|
||
{:error, {status_code, reason}} when is_integer(status_code) -> | ||
send_resp(conn, status_code, inspect(reason)) | ||
conn | ||
|> send_resp(status_code, inspect(reason)) | ||
|> halt() | ||
|
||
{:error, reason} -> | ||
|
@@ -114,7 +117,8 @@ defmodule KubernetesHealthCheck.Plug do | |
|> halt() | ||
|
||
{:error, {status_code, reason}} when is_integer(status_code) -> | ||
send_resp(conn, status_code, inspect(reason)) | ||
conn | ||
|> send_resp(status_code, inspect(reason)) | ||
|> halt() | ||
|
||
{:error, reason} -> | ||
|
@@ -133,7 +137,8 @@ defmodule KubernetesHealthCheck.Plug do | |
|> halt() | ||
|
||
{:error, {status_code, reason}} when is_integer(status_code) -> | ||
send_resp(conn, status_code, inspect(reason)) | ||
conn | ||
|> send_resp(status_code, inspect(reason)) | ||
|> halt() | ||
|
||
{:error, reason} -> | ||
|