Lock In Lab Intern, rank 1 of 9

INC-04 sev 2 5 Sep 2026, filed under On-call

Connection error that wasn't the network

What we saw

Every call to the AI provider failed with "Connection error", but only inside the container. On the laptop, fine.

How we found it

Printing the error's underlying cause instead of the summary: the client was trying to connect to an empty URL.

Cause

The compose file had OPENAI_BASE_URL: ${OPENAI_BASE_URL:-}. When the variable isn't set, that line doesn't leave it unset: it sets it to an empty string. The SDK saw a variable that existed and used it as the base URL.

Fix

Removed the line, and passed the base URL explicitly in code with a real default.

The rule now

Empty is not unset. Treat "" as missing in your own config code, and read the cause of an error, not just its message.