switch to http.StatusOK instead of 200
This commit is contained in:
committed by
Jörn Friedrich Dreyer
parent
1e38150276
commit
6de48a8cd4
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ func Health(cfg *config.Config) *cli.Command {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != http.StatusOK {
|
||||||
logger.Fatal().
|
logger.Fatal().
|
||||||
Int("code", resp.StatusCode).
|
Int("code", resp.StatusCode).
|
||||||
Msg("Health seems to be in bad state")
|
Msg("Health seems to be in bad state")
|
||||||
|
|||||||
Reference in New Issue
Block a user