Commit cdd5045
committed
fix(folders): map reorder internal errors to 500 instead of 400
performReorderFolders caught every transaction failure -- including genuine
unexpected DB/transaction errors, not just client-caused validation issues
-- and returned success:false with no way to distinguish them. The route
then unconditionally mapped any failure to 400, mislabeling real server
errors as bad requests.
Adds errorCode: OrchestrationErrorCode to the result (not_found for
concurrent-deletion races and missing parents, internal for anything else,
following the same pattern already used elsewhere in this file), and the
route now maps status via the shared statusForOrchestrationError helper.
Unexpected errors are logged with their real cause but returned to the
client as a generic message instead of leaking internals.1 parent 374f2ba commit cdd5045
3 files changed
Lines changed: 67 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
270 | 299 | | |
271 | 300 | | |
272 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
782 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
783 | 789 | | |
784 | 790 | | |
785 | 791 | | |
| |||
803 | 809 | | |
804 | 810 | | |
805 | 811 | | |
806 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
807 | 818 | | |
808 | 819 | | |
809 | 820 | | |
| |||
822 | 833 | | |
823 | 834 | | |
824 | 835 | | |
825 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
826 | 842 | | |
827 | 843 | | |
828 | 844 | | |
| |||
837 | 853 | | |
838 | 854 | | |
839 | 855 | | |
840 | | - | |
| 856 | + | |
841 | 857 | | |
842 | 858 | | |
843 | 859 | | |
| |||
871 | 887 | | |
872 | 888 | | |
873 | 889 | | |
874 | | - | |
| 890 | + | |
875 | 891 | | |
876 | 892 | | |
877 | 893 | | |
| |||
880 | 896 | | |
881 | 897 | | |
882 | 898 | | |
883 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
884 | 911 | | |
885 | 912 | | |
886 | 913 | | |
| |||
0 commit comments