1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

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

This commit is contained in:
Athanasius 2022-02-03 13:59:52 +00:00
parent 45b78f55c4
commit 1bb48ed596
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D

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 ""}',