[openstreetmap/openstreetmap-website] Don't include stack backtraces on xml errors when importing traces (PR #5226)

Nenad Vujicic notifications at github.com
Fri Sep 20 15:57:40 UTC 2024


> > Regarding "Entity: line 1: parser error : Start tag expected, '<' not found" message, it's introduced by adding test_parse_error_notification which tries to load JPG file with XML reader.
> 
> Do you think that if you upload a binary file without this PR, the error won't be printed?

Ah, I apologize. You are right, I was thinking only for automated testing and forgot it will be printed also by logger when we manually try to upload some binary file (e.g. JPG) ... 

> > Perhaps the best would be to redirect stderr to temporary file which could be printed if this test fails?
> 
> We don't need this error printed because we're additionally logging it with Rails logger.
> 
> I disabled xml library error writing for this case but there's also another path for multi-file archives with different errors. And there's also a changeset diff reader elsewhere.

Now it works great, thank you very much. There is no more xml library error, neither during automated tests nor during manually uploading trace files.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5226#issuecomment-2364045383
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5226/c2364045383 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240920/f95aace1/attachment.htm>


More information about the rails-dev mailing list