You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture.qmd
+5-12Lines changed: 5 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -102,18 +102,16 @@ Here are some patterns we've considered for server-side error handling:
102
102
border-collapse: collapse;
103
103
}
104
104
105
-
.styled-tableth:nth-child(1) { width: 5%; }
106
-
.styled-tableth:nth-child(2) { width: 50%; }
107
-
.styled-tableth:nth-child(3),
108
-
.styled-tableth:nth-child(4),
109
-
.styled-tableth:nth-child(5) { width: 15%; }
110
-
.styled-tableth:nth-child(6) { width: 10%; }
105
+
.styled-tableth:nth-child(1) { width: 50%; }
106
+
.styled-tableth:nth-child(2),
107
+
.styled-tableth:nth-child(3),
108
+
.styled-tableth:nth-child(4) { width: 15%; }
109
+
.styled-tableth:nth-child(5) { width: 10%; }
111
110
</style>
112
111
113
112
<tableclass="styled-table">
114
113
<thead>
115
114
<tr>
116
-
<th>ID</th>
117
115
<th>Approach</th>
118
116
<th>Returns to same page</th>
119
117
<th>Preserves form inputs</th>
@@ -123,39 +121,34 @@ Here are some patterns we've considered for server-side error handling:
123
121
</thead>
124
122
<tbody>
125
123
<tr>
126
-
<td>1</td>
127
124
<td>Validate with Pydantic dependency, catch and redirect from middleware (with exception message as context) to an error page with "go back" button</td>
128
125
<td>No</td>
129
126
<td>Yes</td>
130
127
<td>Yes</td>
131
128
<td>Low</td>
132
129
</tr>
133
130
<tr>
134
-
<td>2</td>
135
131
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param</td>
136
132
<td>Yes</td>
137
133
<td>No</td>
138
134
<td>Yes</td>
139
135
<td>Medium</td>
140
136
</tr>
141
137
<tr>
142
-
<td>3</td>
143
138
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param and form inputs as context so we can re-render page with original form inputs</td>
144
139
<td>Yes</td>
145
140
<td>Yes</td>
146
141
<td>Yes</td>
147
142
<td>High</td>
148
143
</tr>
149
144
<tr>
150
-
<td>4</td>
151
145
<td>Validate with Pydantic dependency, use session context to get form inputs from request, redirect to origin page from middleware with exception message and form inputs as context so we can re-render page with original form inputs</td>
152
146
<td>Yes</td>
153
147
<td>Yes</td>
154
148
<td>Yes</td>
155
149
<td>High</td>
156
150
</tr>
157
151
<tr>
158
-
<td>5</td>
159
152
<td>Validate in either Pydantic dependency or function endpoint body and directly return error message or error toast HTML partial in JSON, then mount error toast with HTMX or some simple layout-level Javascript</td>
Copy file name to clipboardExpand all lines: docs/static/documentation.txt
+5-12Lines changed: 5 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -322,18 +322,16 @@ Here are some patterns we've considered for server-side error handling:
322
322
border-collapse: collapse;
323
323
}
324
324
325
-
.styled-table th:nth-child(1) { width: 5%; }
326
-
.styled-table th:nth-child(2) { width: 50%; }
327
-
.styled-table th:nth-child(3),
328
-
.styled-table th:nth-child(4),
329
-
.styled-table th:nth-child(5) { width: 15%; }
330
-
.styled-table th:nth-child(6) { width: 10%; }
325
+
.styled-table th:nth-child(1) { width: 50%; }
326
+
.styled-table th:nth-child(2),
327
+
.styled-table th:nth-child(3),
328
+
.styled-table th:nth-child(4) { width: 15%; }
329
+
.styled-table th:nth-child(5) { width: 10%; }
331
330
</style>
332
331
333
332
<table class="styled-table">
334
333
<thead>
335
334
<tr>
336
-
<th>ID</th>
337
335
<th>Approach</th>
338
336
<th>Returns to same page</th>
339
337
<th>Preserves form inputs</th>
@@ -343,39 +341,34 @@ Here are some patterns we've considered for server-side error handling:
343
341
</thead>
344
342
<tbody>
345
343
<tr>
346
-
<td>1</td>
347
344
<td>Validate with Pydantic dependency, catch and redirect from middleware (with exception message as context) to an error page with "go back" button</td>
348
345
<td>No</td>
349
346
<td>Yes</td>
350
347
<td>Yes</td>
351
348
<td>Low</td>
352
349
</tr>
353
350
<tr>
354
-
<td>2</td>
355
351
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param</td>
356
352
<td>Yes</td>
357
353
<td>No</td>
358
354
<td>Yes</td>
359
355
<td>Medium</td>
360
356
</tr>
361
357
<tr>
362
-
<td>3</td>
363
358
<td>Validate in FastAPI endpoint function body, redirect to origin page with error message query param and form inputs as context so we can re-render page with original form inputs</td>
364
359
<td>Yes</td>
365
360
<td>Yes</td>
366
361
<td>Yes</td>
367
362
<td>High</td>
368
363
</tr>
369
364
<tr>
370
-
<td>4</td>
371
365
<td>Validate with Pydantic dependency, use session context to get form inputs from request, redirect to origin page from middleware with exception message and form inputs as context so we can re-render page with original form inputs</td>
372
366
<td>Yes</td>
373
367
<td>Yes</td>
374
368
<td>Yes</td>
375
369
<td>High</td>
376
370
</tr>
377
371
<tr>
378
-
<td>5</td>
379
372
<td>Validate in either Pydantic dependency or function endpoint body and directly return error message or error toast HTML partial in JSON, then mount error toast with HTMX or some simple layout-level Javascript</td>
0 commit comments