Commit 3d8e489
committed
fix(files): classify folder and content failures instead of 500ing them
Bugbot round 1. The v2 routes map errorCode straight to a status, so every
manager failure that arrived unclassified became a 500 for what is really a
caller-fixable 400 or 404.
- Folder manager throws OrchestrationError: missing target/folder -> not_found,
reparent cycle / self-parent / restore-into-archived-workspace -> validation.
- File manager does the same for the in-transaction 'File not found' paths that
the earlier pass missed.
- updateWorkspaceFileContent's outer catch re-wrapped everything in a bare
Error, which stripped the class off StorageLimitExceededError and the new
not_found alike. It now rethrows a classified failure untouched and attaches
cause to the generic wrap, so asOrchestrationError can still walk the chain.
- Every remaining perform* gained the asOrchestrationError branch.
- renameWorkspaceFile returned the pre-update read, so the v2 PATCH reported a
stale updatedAt; it now returns the timestamp it actually wrote.
Docs: upload auto-suffixes a duplicate name rather than rejecting it, matching
the in-app uploader. The description claimed 409 and was simply wrong.1 parent 6bb9e7e commit 3d8e489
5 files changed
Lines changed: 283 additions & 27 deletions
File tree
- apps
- docs
- sim/lib
- uploads/contexts/workspace
- workspace-files/orchestration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
Lines changed: 22 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | | - | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| |||
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
561 | | - | |
| 562 | + | |
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
| |||
568 | 569 | | |
569 | 570 | | |
570 | 571 | | |
571 | | - | |
| 572 | + | |
| 573 | + | |
572 | 574 | | |
573 | 575 | | |
574 | 576 | | |
| |||
585 | 587 | | |
586 | 588 | | |
587 | 589 | | |
588 | | - | |
| 590 | + | |
589 | 591 | | |
590 | 592 | | |
591 | 593 | | |
| |||
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
606 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
607 | 612 | | |
608 | 613 | | |
609 | 614 | | |
| |||
653 | 658 | | |
654 | 659 | | |
655 | 660 | | |
656 | | - | |
| 661 | + | |
657 | 662 | | |
658 | 663 | | |
659 | 664 | | |
| |||
717 | 722 | | |
718 | 723 | | |
719 | 724 | | |
720 | | - | |
| 725 | + | |
721 | 726 | | |
722 | 727 | | |
723 | 728 | | |
724 | 729 | | |
725 | | - | |
| 730 | + | |
726 | 731 | | |
727 | 732 | | |
728 | 733 | | |
| |||
740 | 745 | | |
741 | 746 | | |
742 | 747 | | |
743 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
744 | 752 | | |
745 | 753 | | |
746 | 754 | | |
| |||
891 | 899 | | |
892 | 900 | | |
893 | 901 | | |
894 | | - | |
| 902 | + | |
895 | 903 | | |
896 | 904 | | |
897 | 905 | | |
| |||
944 | 952 | | |
945 | 953 | | |
946 | 954 | | |
947 | | - | |
| 955 | + | |
948 | 956 | | |
949 | 957 | | |
950 | 958 | | |
| |||
959 | 967 | | |
960 | 968 | | |
961 | 969 | | |
962 | | - | |
963 | | - | |
| 970 | + | |
| 971 | + | |
964 | 972 | | |
965 | 973 | | |
966 | 974 | | |
| |||
Lines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
1126 | | - | |
| 1126 | + | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | 1129 | | |
| |||
1170 | 1170 | | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | | - | |
| 1173 | + | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1259 | 1264 | | |
1260 | | - | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
1261 | 1268 | | |
1262 | 1269 | | |
1263 | 1270 | | |
| |||
1289 | 1296 | | |
1290 | 1297 | | |
1291 | 1298 | | |
| 1299 | + | |
1292 | 1300 | | |
1293 | 1301 | | |
1294 | 1302 | | |
1295 | | - | |
| 1303 | + | |
1296 | 1304 | | |
1297 | 1305 | | |
1298 | 1306 | | |
| |||
1309 | 1317 | | |
1310 | 1318 | | |
1311 | 1319 | | |
1312 | | - | |
| 1320 | + | |
1313 | 1321 | | |
1314 | 1322 | | |
1315 | 1323 | | |
1316 | 1324 | | |
1317 | 1325 | | |
1318 | 1326 | | |
1319 | 1327 | | |
| 1328 | + | |
1320 | 1329 | | |
1321 | 1330 | | |
1322 | 1331 | | |
| |||
1337 | 1346 | | |
1338 | 1347 | | |
1339 | 1348 | | |
1340 | | - | |
| 1349 | + | |
1341 | 1350 | | |
1342 | 1351 | | |
1343 | 1352 | | |
| |||
1377 | 1386 | | |
1378 | 1387 | | |
1379 | 1388 | | |
1380 | | - | |
| 1389 | + | |
1381 | 1390 | | |
1382 | 1391 | | |
1383 | 1392 | | |
| |||
1400 | 1409 | | |
1401 | 1410 | | |
1402 | 1411 | | |
1403 | | - | |
| 1412 | + | |
1404 | 1413 | | |
1405 | 1414 | | |
1406 | 1415 | | |
| |||
1442 | 1451 | | |
1443 | 1452 | | |
1444 | 1453 | | |
1445 | | - | |
| 1454 | + | |
1446 | 1455 | | |
1447 | 1456 | | |
1448 | 1457 | | |
| |||
0 commit comments