fix error handling example