Format an error message for production.
Return a function which formats an error message for production.