Move exceptions into infrastructure package