Skip to content

Commit 3b1f2cc

Browse files
committed
feat: add custom error for when a file can't be parsed into the cache
1 parent f8f6fb2 commit 3b1f2cc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/entitlements/data/groups/cached.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def self.load_caches(dir)
5151
Entitlements.cache[:predictive_state][:by_ou][ou] ||= {}
5252
Entitlements.cache[:predictive_state][:by_ou][ou][identifier] = member_set
5353
Entitlements.cache[:predictive_state][:by_dn][dn] = { members: member_set, metadata: metadata }
54+
rescue => e
55+
raise "Failed to load predictive state cache file #{filename}: #{e.message}"
5456
end
5557

5658
Entitlements.logger.debug "Loaded #{Entitlements.cache[:predictive_state][:by_ou].keys.size} OU(s) from cache"

0 commit comments

Comments
 (0)