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

Catch 'user not found' type of errors #1

Open
dokterbob opened this issue Feb 14, 2014 · 0 comments
Open

Catch 'user not found' type of errors #1

dokterbob opened this issue Feb 14, 2014 · 0 comments

Comments

@dokterbob
Copy link
Member

When requesting a token for unknown users, iProva yields the following exception:

WebFault(u"Server raised fault: 'System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: The user is not known in the system!\n   at Infoland.Suite.Security.GetTokenForUser(String strTrustedApplicationID, String strLoginCode, HttpRequest objRequest)\n   --- End of inner exception stack trace ---'",)

The proper way to handle this (and similar events) is to create a RequestException subclass UserNotFoundException and do a string match on the error string for the aforementioned exception. This allows for much more precise logging and discrimination of 'user not found' events (which are relatively harmless) from more severe errors.

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

1 participant