I have a “frappe.log_error” function call in the except block of a task that executes daily. The problem is, it sometimes throws a “Duplicate Entry” error for the “Error Log” and crashes the ongoing operation. IMHO, this shouldn’t be the case (except there’s something I’m missing). An error log should “log” and not upset the system, if there’s a need for “uniqueness”, then the “log time” should take care of that.
I’m currently left with no other choice but to either remove the log statement, create a doctype just for logging or clear logs before starting the tasks… all of which are unwanted and unnecessary.
Please clarify if I’m out of line for suggesting this.