Skip to content

Commit 5aa2372

Browse files
committed
Guard against undefined NetworkSettings in container data
Not clear why this can happen, but it does, and simply ignoring network data from containers that are somehow in this state is all we can reasonably do to handle it.
1 parent 00c969f commit 5aa2372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interceptors/docker/docker-interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class DockerContainerInterceptor implements Interceptor {
5959
state: containerData.State,
6060
status: containerData.Status,
6161
image: containerData.Image,
62-
ips: Object.values(containerData.NetworkSettings.Networks)
62+
ips: Object.values(containerData.NetworkSettings?.Networks ?? {})
6363
.map(network => network.IPAddress)
6464
}))
6565
.keyBy('id')

0 commit comments

Comments
 (0)