From 1bb48ed5960aef0951df0291b0cfeea9f7cd519e Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 3 Feb 2022 13:59:52 +0000 Subject: [PATCH] eddn/codexentry: Bail and show error if empty string in message --- plugins/eddn.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/eddn.py b/plugins/eddn.py index 5e4f5749..afab0458 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -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 ""}',