File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -339,11 +339,14 @@ def createSecurityContent(
339
339
error_msg = err .get ("msg" , "" )
340
340
if "https://errors.pydantic.dev" in error_msg :
341
341
# Unfortunately, this is a catch-all for untyped errors. We will still need to emit this
342
- # It will fall through the if/else statement below to the else condition.
343
- pass
342
+ # This is harder to read, but the other option is suppressing it which we cannot do as
343
+ # it makes troubleshooting extremelt difficult
344
+ print (
345
+ f" { Colors .RED } { Colors .ERROR } { error_msg } { Colors .END } "
346
+ )
344
347
345
348
# Clean error categorization
346
- if "Field required" in error_msg :
349
+ elif "Field required" in error_msg :
347
350
print (
348
351
f" { Colors .YELLOW } { Colors .WARNING } Field Required: { err .get ('loc' , ['' ])[0 ]} { Colors .END } "
349
352
)
You can’t perform that action at this time.
0 commit comments