sbp opened a new issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124


   This happened when using 1290575:
   
   ```
   An error code 500 occured while trying to fetch
     https://DOMAIN/api/stats.lua?list=LIST&domain=DOMAIN:
   API error occurred:
   Traceback (most recent call last):
   
   File "main.py", line 133, in handle_request
   output = await xhandler.exec(self, session, indata)
   
   File "/var/www/foal/server/endpoints/stats.py", line 50, in process
   session, query_defuzzed, query_limit=server.config.database.max_hits, 
shorten=True,
   
   File "/var/www/foal/server/plugins/messages.py", line 356, in query
   if shorten and len(doc["body_short"] or "") > BODY_MAXLEN:
   
   KeyError: 'body_short'
   ```
   
   I tried changing all instances to `doc.get("body_short", "")` and ensuring 
that the `KeyError` in the `del` is caught, but now it doesn't show any bodies 
in the archive.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to