Refactored exception from constant to resource