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

Person Not Found Exceptions #30

Closed
caseywatts opened this issue Sep 22, 2014 · 3 comments
Closed

Person Not Found Exceptions #30

caseywatts opened this issue Sep 22, 2014 · 3 comments

Comments

@caseywatts
Copy link
Contributor

Try testing with a bogus email address, etc - it will crash the app. We should:

  1. Catch any/all lookup exceptions elegantly
  2. Determine the exception we should raise when the problem is we can't find someone, raise that one and catch it specifically (is there a standard / ruby core version of "NobodyFound" we should use?)

Related to this YaleLDAP issue, except we need the same functionality for magstripe and prox card - I'm not sure where it should live.
YaleSTC/yaleldap#4

@caseywatts caseywatts assigned caseywatts and unassigned caseywatts Sep 22, 2014
@caseywatts
Copy link
Contributor Author

I want to wait to do this until we get the API version of card lookup (instead of the database one). I want to catch all of the errors in a consistent way.

@caseywatts
Copy link
Contributor Author

going to use self.errors.add_to_base("Person Not Found")

@caseywatts
Copy link
Contributor Author

Not add_to_base, that's just for ActiveRecord. After talking with Oren and Simon we decided to rescue and re-raise the error with a better message.

Done, and merged into master!

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

No branches or pull requests

1 participant