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

Use RecordNotFoundError exception when record is not found. #115

Closed
nsheff opened this issue Nov 7, 2023 · 2 comments
Closed

Use RecordNotFoundError exception when record is not found. #115

nsheff opened this issue Nov 7, 2023 · 2 comments

Comments

@nsheff
Copy link
Contributor

nsheff commented Nov 7, 2023

In many places, I'm finding that retrieve_one will return None if the record_identifier is bad.

It would be more convenient for me if it would raise a RecordNotFoundError (which already exists), and I think is what this exception type was meant for. Then I can catch this and return a coherent message to the user. With just returning "none" silently, I'm having to build more error handling code.

I think there are several places that it just returns None -- maybe these should instead raise appropriate exceptions?

@donaldcampbelljr
Copy link
Contributor

Fixed:
363a54c

@donaldcampbelljr
Copy link
Contributor

Closed via #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants