Skip to content

Commit 287c6f9

Browse files
committed
fix: do not allow request if docker labels check fail
1 parent 0255e95 commit 287c6f9

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

internal/service/docker_service.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,12 @@ func (docker *DockerService) GetLabels(appDomain string) (config.App, error) {
7171
for _, ctr := range containers {
7272
inspect, err := docker.InspectContainer(ctr.ID)
7373
if err != nil {
74-
log.Warn().Str("id", ctr.ID).Err(err).Msg("Error inspecting container, skipping")
75-
continue
74+
return config.App{}, err
7675
}
7776

7877
labels, err := decoders.DecodeLabels(inspect.Config.Labels)
7978
if err != nil {
80-
log.Warn().Str("id", ctr.ID).Err(err).Msg("Error getting container labels, skipping")
81-
continue
79+
return config.App{}, err
8280
}
8381

8482
for appName, appLabels := range labels.Apps {

0 commit comments

Comments
 (0)