Repository navigation
Commit 092de58
committed
fix(serverless): fail file() on HTTP error responses
file() saved whatever body came back, so a 4xx/5xx error page was written
as the downloaded file and, when the URL ended in .zip, handed to the
extractor. download_files_from_urls already called raise_for_status();
file() never did.
Behavior change: file() now raises requests.RequestException on an error
status instead of returning a dict pointing at the error page. It has no
in-tree callers and is not re-exported from serverless.utils, so this is
limited to direct importers.1 parent 831a1f5 commit 092de58
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
237 | 257 | | |
238 | 258 | | |
239 | 259 | | |
| |||
0 commit comments