Distinguish between expected and unexpected errors