convert an error message into a more appropriate debug log entry