Harmonize the error handling codepath