Skip to main content

Bug fixes

Modal failures on the parallel CLI commands (issue #884) parallel search, parallel extract, and parallel findall invoke the deployed Modal app with modal.Function.from_name(...).remote(...), wrapped in an except clause that funnels failures into the CLI contract’s Error: <msg> stderr line with exit code 1. A repo-wide lint pass (#675) narrowed those clauses to builtin exception tuples — but every Modal-wrapped failure (FunctionTimeoutError, AuthError, NotFoundError, ConnectionError, InternalFailure, RemoteError, ExecutionError) roots at modal.exception.Error → Exception, not at any of those builtins, so the whole Modal failure hierarchy escaped uncaught. Exit codes stayed right (1, set by the unhandled exception) and stderr still carried the traceback, but the contract’s Error: prefix line — the format agents are documented to read — never printed. The handlers now catch modal.exception.Error alongside the builtin tuples. findall’s clauses previously caught only ExecutionError, which covers the deserialization-failure surface alone, and are widened to the full hierarchy. Remote user-code exceptions that survive the round trip as their original builtin class are still caught by the retained tuples, and broad except Exception masking of CLI programming bugs stays avoided. Regression tests mock from_name/remote to raise every modal.exception.Error surface and assert the exit-1 / Error:-prefixed-stderr / empty-stdout contract shape for all six remote-call sites.
Last modified on October 2, 2026