Commit 6d7fd5f
committed
fix(media): restore small-file fallback and notify user on HTTP 4xx
- Restore ≤1MB raw-byte fallback when resize_and_compress fails after
validate_image_response passes. The body is confirmed valid by magic-byte
check, so forwarding original bytes is safe. Prevents regression for
formats the image crate can detect but not fully decode (e.g. animated WebP).
- Add HttpStatus 4xx match arm in Slack handler to push filename into
failed_image_files. HTTP 4xx (401/403) indicates a persistent permission
problem (similar root cause to #776) and the user should be notified.
5xx and Network errors remain log-only (transient).1 parent 4967718 commit 6d7fd5f
2 files changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
282 | 287 | | |
283 | 288 | | |
284 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1069 | 1075 | | |
1070 | 1076 | | |
1071 | 1077 | | |
| |||
0 commit comments