Correct error handling example