Repository: yt-dlp
Issue: `--max-filesize` not return error status code
Labels: bug,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2023.06.22** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

When we use `--max-filesize` if error occurs, the output is not an error status code: In my terminal error become red, But as you can see it's not red in this situation:

![image](https://github.com/yt-dlp/yt-dlp/assets/53290883/3fd61e91-3ab2-4bdc-b85b-3d3e8013cef0)


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '--max-filesize', '1M', 'https://www.youtube.com/watch?v=5JPfhzPi2DE']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.06.22 [812cdfa06] (pip)
[debug] Python 3.10.12 (CPython aarch64 64bit) - Linux-5.15.0-71-generic-aarch64-with (OpenSSL 1.1.1u  30 May 2023)
[debug] exe versions: ffmpeg 5.1 (fdk,setts), ffprobe 5.1
[debug] Optional libraries: certifi-2023.05.07, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1851 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.06.22, Current version: stable@2023.06.22
yt-dlp is up to date (stable@2023.06.22)
[youtube] Extracting URL: https://www.youtube.com/watch?v=5JPfhzPi2DE
[youtube] 5JPfhzPi2DE: Downloading webpage
[youtube] 5JPfhzPi2DE: Downloading ios player API JSON
[youtube] 5JPfhzPi2DE: Downloading android player API JSON
[debug] [youtube] Extracting signature function js_23604418_105
[debug] Loading youtube-sigfuncs.js_23604418_105 from cache
[debug] Loading youtube-nsig.23604418 from cache
[debug] [youtube] Decrypted nsig lV7F8gGzOpyhF-4 => fijep4a-BY5EIg
[youtube] 5JPfhzPi2DE: Downloading m3u8 information
WARNING: [youtube] Failed to download m3u8 information: HTTP Error 429: Too Many Requests
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 5JPfhzPi2DE: Downloading 1 format(s): 315+251
[debug] Invoking http downloader on "https://rr3---sn-4g5lznek.googlevideo.com/videoplayback?expire=1688394836&ei=9IeiZO2tNYe01gKU8JPoBw&ip=2a01%3A4f8%3Ac010%3A51b9%3A%3A1&id=o-ACbY2ggxuqiNaYyIGg-B7M_g-V1RN7ElTr5qzcA7wGxH&itag=315&source=youtube&requiressl=yes&mh=-S&mm=31%2C29&mn=sn-4g5lznek%2Csn-4g5ednly&ms=au%2Crdu&mv=m&mvi=3&pl=51&gcr=de&initcwndbps=681250&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=77339739616&dur=41649.599&lmt=1682496692054937&mt=1688372746&fvip=4&keepalive=yes&fexp=24007246&c=IOS&txp=7319224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRAIgdOfPA35e3snLKglEMNb3J18ob5b8oiVHysA1g6I1G-gCIHAjlvsyp9aAEyCya-lAcxZhkSCCvIrNLCTHfLY8cNGn&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhANEcuR-s3s6T8vqI7Cp7c4rTEkF25BEcPXsLZKaXuBOsAiBdQ6U7jIG4myxStBb6i3MKzohxp0poP5bTohsOjfmDug%3D%3D"
[download] File is larger than max-filesize (10287964 bytes > 1048576 bytes). Aborting.

[debug] Invoking http downloader on "https://rr3---sn-4g5lznek.googlevideo.com/videoplayback?expire=1688394837&ei=9IeiZI3zPMvz1gLPwZWADw&ip=2a01%3A4f8%3Ac010%3A51b9%3A%3A1&id=o-AOL4DitfWHlnaaabqb7YuR9N8kcb73w8Tn6z3F_GKbsW&itag=251&source=youtube&requiressl=yes&mh=-S&mm=31%2C26&mn=sn-4g5lznek%2Csn-f5f7kn7z&ms=au%2Conr&mv=m&mvi=3&pl=51&gcr=de&initcwndbps=662500&bui=AYlvQAt74HV6smJtCAz5aH3ZR9wjOmPFDkgCshEKAake3qTI-FZmmO2h0cCDP4H9xLTsFq4NJzE7iO8R2MLGFNknLVL0CRpD&spc=Ul2Sq9XJWZcrnnuWXEn8MLzooA9Id3o&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=801272967&dur=41649.621&lmt=1682490093055030&mt=1688372746&fvip=3&keepalive=yes&fexp=24007246%2C51000024&c=ANDROID&txp=7318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAIMYGGpcF1fiAXuJDwP3SUFacvlUNQSdUDB5zqrj8LMOAiEAqTAezPhPjJP8TnRQqN4JudeKDIwVwFYCnBQA-5yVnp0%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgJDZF_WoMUia4q4G0ZoQApC9TejUOgOdKfT7BV7ruVV8CIQCF_aJBs2VhxdLp9YpeUcW6vDNdyMIYUZ9CKfR5FPosxw%3D%3D"
[download] File is larger than max-filesize (10183962 bytes > 1048576 bytes). Aborting.
```