Improve format for error object