Closed Hashfastr closed 1 year ago
Unsure of labels or how to add them at the moment seeing it's greyed out for me.
Thanks for the suggestion! There is a reason for the emojis: sometimes when I'm developing/debugging artifact processing I'm looking at hundreds or thousands of files, and they're zipping by in the logs quickly. Those icons (which I use across many of the internal malcolm scripts) make it easier to visually identify the operation at a glance.
But I do agree that in this case the message needs to be more helpful to the end user as well. I think I will probably retain the icon but also add a more descriptive error message as you suggested.
π£ Description
Changing error log for file upload when there's an invalid file type uploaded. Previously just printed a single trashcan emoji (ποΈ), changed to be more descriptive.
π Motivation and context
When debugging why I couldn't upload a PCAP file to Malcolm I kept getting the below error.
This is minimally descriptive only providing a trashcan emoji along with the file name and mime type. The message can be assumed that your submitted file was immediately deleted. While the attached filename and mime type seems much more descriptive of what was uploaded, but not to why the error occurred.
This pull request changed this single line error to two much more descriptive errors:
While I like the flair emojis give scripts, putting them into error logs is a misstep and either further obfuscates the error at hand, or makes it much more difficult to parse.
π§ͺ Testing
Splits one print statement into two, removes an emoji, don't really think this applies.
β Pre-approval checklist
β Pre-merge checklist
β Post-merge checklist