Handle common error scenarios.