Error handling skeleton