Skip to content

Commit cdf6a5f

Browse files
authored
emit unknown messages
without additional formatting
1 parent 5716974 commit cdf6a5f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

contentctl/input/director.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,14 @@ def createSecurityContent(
339339
error_msg = err.get("msg", "")
340340
if "https://errors.pydantic.dev" in error_msg:
341341
# 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+
)
344347

345348
# Clean error categorization
346-
if "Field required" in error_msg:
349+
elif "Field required" in error_msg:
347350
print(
348351
f" {Colors.YELLOW}{Colors.WARNING} Field Required: {err.get('loc', [''])[0]}{Colors.END}"
349352
)

0 commit comments

Comments
 (0)