How to Intercept and Customize Timesheet Time Overlap Error Messages in ERPNext?

I’m working on a custom app which gets data from one application to ERPNext Timesheet Doctyps. Whenever there is a time overlap in Timesheet I get the default error message.
image
I would like to intercept this message, to add a my own custom error text before it is displayed to the user.

Is there a recommended or “clean” way to catch this time-overlap error and transform it into a custom message?