Make long error messages easier to inspect (#4226)