eddn/codexentry: Bail and show error if empty string in message

This commit is contained in:
Athanasius committed 2022-02-03 13:59:52 +00:00
1 parent 45b78f55c4
commit 1bb48ed596
1 file changed
+4
+4
View File
@@ -962,6 +962,10 @@ class EDDN:
for k, v in entry.items():
if v is None or isinstance(v, str) and v == '':
logger.warning(f'post-processing entry contains entry["{k}"] = {v} {(type(v))}')
# We should drop this message and VERY LOUDLY inform the
# user, in the hopes they'll open a bug report with the
# raw Journal event that caused this.
return 'CodexEntry had empty string, PLEASE ALERT THE EDMC DEVELOPERS'
msg = {
'$schemaRef': f'https://eddn.edcd.io/schemas/codexentry/1{"/test" if is_beta else ""}',