mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 21:26:39 +00:00
`get_readme` and `get_file_content` answered every failure with a string -- `[README not found: HTTP 404]`, `[File not found: HTTP 404]` -- while `main()` prints any string result on stdout and exits 0. A rate-limited run, a missing repository and a real README therefore arrived on the same channel with the same exit code, so a caller reading stdout could not tell a failure from a body. Both readers now raise `GitHubAPIError` naming the operation, the target and the underlying HTTP error. The CLI's existing handler already writes an exception to stderr and exits 1, so a failure leaves the success channel empty and the status stays visible; a successful fetch is unchanged. Pins both transports (requests and the urllib fallback), 404 against 403 so a rate limit cannot read as a missing repository, the file reader's path, and the CLI contract: non-zero exit, empty stdout, status on stderr.