Commit e2be8c1
authored
Harden parseErrorCodeFromS3 to never throw on non-XML responses (#13021)
* Harden parseErrorCodeFromS3 to never throw on non-XML responses 7.3 (#12997) - 7.3
* Harden parseErrorCodeFromS3 to never throw on non-XML responses (#12986) - main
Add parseErrorCodeFromS3 function that safely extracts S3 error codes
from XML responses, returning "" instead of throwing on parse failures
since many HTTP error responses (502/503 HTML pages, empty bodies) are
not XML. Wire it into doRequest_impl error handling to log S3ErrorCode
and detect bad requests. Add unit tests.
(cherry picked from commit 7388f54)
* Log all S3 4xx client errors, not just 400
Widen the S3 error logging from only HTTP 400 to all 4xx client errors
(403, 404, 409, etc). Remove unused badRequestCode variable. Rename
trace event from S3BlobStoreBadRequest to S3BlobStoreClientError.
* Fix trace
* Simplify S3BlobStore request error handling (merge PR #13001)
* Remove separate S3BlobStoreClientError event, use existing event1 parent 0ec3117 commit e2be8c1
1 file changed
Lines changed: 28 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1225 | 1228 | | |
1226 | 1229 | | |
1227 | | - | |
| 1230 | + | |
1228 | 1231 | | |
1229 | 1232 | | |
1230 | 1233 | | |
| |||
1241 | 1244 | | |
1242 | 1245 | | |
1243 | 1246 | | |
| 1247 | + | |
1244 | 1248 | | |
1245 | 1249 | | |
1246 | | - | |
| 1250 | + | |
1247 | 1251 | | |
1248 | 1252 | | |
1249 | 1253 | | |
1250 | 1254 | | |
1251 | 1255 | | |
1252 | 1256 | | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | 1257 | | |
1271 | 1258 | | |
1272 | 1259 | | |
| |||
1281 | 1268 | | |
1282 | 1269 | | |
1283 | 1270 | | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1284 | 1281 | | |
1285 | 1282 | | |
1286 | 1283 | | |
| |||
0 commit comments