-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cl/handle search infrastructure exceptions #35
Conversation
Closed = 0, | ||
Open = 1, | ||
Unknown | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a rename from StatusCode - not new code
InvalidRequest, | ||
SearchServiceError, | ||
DataFormatError | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual main thing I've added - this response status and the setting of it by the use-case and the mapper
Dfe.Data.SearchPrototype/SearchForEstablishments/SearchResponseStatus.cs
Outdated
Show resolved
Hide resolved
Dfe.Data.SearchPrototype/Infrastructure/Tests/CognitiveSearchServiceAdapterTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the caveat of my comment about the currently unused SearchResponseStatus.DataFormatError
(personally I'd not want to block the PR based just on this unused value) and caution re: I don't quite have a full mental model yet of how everything fits together, it's a ✅ from me 👍
- the commits seem to follow a logical progression
- the tests seem to be testing what they say to be testing
- overall this seems a good/reasonable improvement
A few nitpicky comments if we were to refine the PR (i.e., not anything I'd want to block the PR on):
- Seems to be a few nullability mismatches floating around (parameters marked as non-nullable then a robust additional runtime check for null causing warnings, and a few places in the tests use
!
to override the nullability declarations) - Possibly split the PR into refactoring changes (renaming/moving) vs functionality (behaviour) changes?
Added and modified tests to better define and test behaviour
Added a response status to the application layer
Some small tidy-ups like adding a models folder which now makes the PR look massive - sorry about that :(