Add ability to set custom errors.