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

PersonLookupService should throw NotFoundException instead of returning null #228

Open
CelineTrammi opened this issue Jun 14, 2024 · 0 comments
Labels
kind/feature-request New feature or request

Comments

@CelineTrammi
Copy link

Description

The documentation is making it seem as though the client will throw exception if no persons are found, given user input for SSN and last name. However, it returns null if no person is found and maximumFailedAttempts are not at maximum.

I think it is better to be consistent and throw an exception if no person is found rather than using different ways of corrective measures.

try
{
    ...
    return true;
}
catch (PlatformHttpException phex)
{
    switch (phex.Response.StatusCode)
    {
        case HttpStatusCode.TooManyRequests:
            // Add corrective messures
            break;
        case HttpStatusCode.NotFound:
            // Add corrective messures
            break;
    }
    throw;
}

Additional Information

No response

@CelineTrammi CelineTrammi added the kind/feature-request New feature or request label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant