Commit ae6ec70
committed
Fix blackd returning 500 for invalid f-strings
When blackd receives code with invalid f-strings (e.g. f"{}"), ast.parse()
raises ASTSafetyError. This fell through to the generic except Exception
handler, returning HTTP 500. Add specific handler to return HTTP 400.
Fixes #36161 parent e079b7e commit ae6ec70
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
0 commit comments