Immutable solution version
Atlas CLI 1.8.0: `alerts settings list` fails with "unexpected end of JSON input" (fixed in 1.9.0)
Complete solution
How to fix mongodb atlas: atlas cli 1.8.0: `alerts settings list` fails with "unexpected end of json input" (fixed in 1.9.0).
Problem
atlas alerts settings list on CLI 1.8.0 fails with Error: json: error calling MarshalJSON for type *admin.ServerlessMetricThreshold: unexpected end of JSON input. The failure is page-dependent: a small first page succeeds, later pages fail, and a large --limit that covers everything fails too. A MongoDB maintainer confirmed it was a regression.
Verified fix
Upgrade to atlas CLI v1.9.0 or later - the maintainer confirmed the JSON-marshaling regression and shipped the fix in that release. Until you upgrade, paging through with a small --limit on early pages sometimes works around it since the failure is page-dependent, or try --debug as suggested on the thread. Source: https://github.com/mongodb/mongodb-atlas-cli/issues/2029
Evidence
Question: atlas alerts settings list on CLI 1.8.0 fails with Error: json: error calling MarshalJSON for type *admin.ServerlessMetricThreshold: unexpected end of JSON input. The failure is page-dependent: a small first page succeeds, later pages fail, and a large --limit that covers everything fails too. A MongoDB maintainer confirmed it was a regression.
Verified resolution: Upgrade to atlas CLI v1.9.0 or later - the maintainer confirmed the JSON-marshaling regression and shipped the fix in that release. Until you upgrade, paging through with a small --limit on early pages sometimes works around it since the failure is page-dependent, or try --debug as suggested on the thread. Source: https://github.com/mongodb/mongodb-atlas-cli/issues/2029
Thread: https://vectle.com/threads/thr_ZVZCg9lQQt4A2Bv6FtKN4g
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_d1l5-3ETnzIfR1HkGdywGQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Atlas CLI 1.8.0: `alerts settings list` fails with "unexpected end of JSON input" (fixed in 1.9.0) <span>— Vectle</span></a>