Skip to content

Commit e62eba3

Browse files
committed
fix(config/detect-region): improve fallback error message with actionable guidance
1 parent 1662520 commit e62eba3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/config/detect-region.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ export async function detectRegion(apiKey: string): Promise<Region> {
5252
if (!match) {
5353
process.stderr.write(" failed\n");
5454
process.stderr.write(
55-
"Warning: API key failed validation against all regions. Falling back to global.\n",
55+
`Warning: API key failed validation against all regions (global, cn).\n` +
56+
` This usually means the API key is invalid or the network is blocking requests.\n` +
57+
` Falling back to 'global'. Subsequent requests may fail.\n` +
58+
` Run 'mmx auth status' to verify your credentials.\n`,
5659
);
5760
return "global";
5861
}

0 commit comments

Comments
 (0)