move back to using format_error/1