Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error on failed persist value conversion #614

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Nov 19, 2024

Add PersistError.invalidConversion, if you cannot cast/convert to requested type in PersistDriver.get(key:as:) then throw error

Up until this point the persist drivers have been inconsistent in how to deal with this situation. I will update others to be consistent with MemoryPersistDriver once this is in.

Add PersistError.invalidType, if you cannot cast to requested type then throw error
@adam-fowler adam-fowler merged commit 70b0714 into main Nov 20, 2024
7 checks passed
@adam-fowler adam-fowler deleted the persist-invalid-conversion branch November 20, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants