diff --git a/apps/api/src/docker/runner.ts b/apps/api/src/docker/runner.ts index 7ae7c7b..c665401 100644 --- a/apps/api/src/docker/runner.ts +++ b/apps/api/src/docker/runner.ts @@ -95,7 +95,11 @@ export const runDocker = async ( throw new HttpError(504, "Docker Mailserver command timed out."); } - throw new HttpError(502, "Docker Mailserver is unreachable."); + if (error instanceof Error && "code" in error && error.code === "ENOENT") { + throw new HttpError(502, `Docker binary '${config.dockerBinary}' was not found. Set DOCKER_BINARY to the absolute docker path on NixOS.`); + } + + throw new HttpError(502, error instanceof Error ? error.message : "Docker Mailserver is unreachable."); } finally { clearTimeout(timeout); }