Part 4: Error handling