Refactored to match on-error api
2.0.0