Fixing a broken error raise in Resource