Fix generated code to use error interface.