-
Notifications
You must be signed in to change notification settings - Fork 2
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
[ESWE-1080] publish expression of interest api #581
Conversation
if (hmppsIdCheck.hasError(UpstreamApiError.Type.ENTITY_NOT_FOUND)) { | ||
logger.info("Could not find nomis number for hmppsId: $hmppsId") | ||
return ResponseEntity.badRequest().build() | ||
} |
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.
Shall we return 404 instead of 400?
if (hmppsIdCheck.hasError(UpstreamApiError.Type.BAD_REQUEST)) { | ||
logger.info("Invalid hmppsId: $hmppsId") | ||
return ResponseEntity.badRequest().build() |
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.
similar question... is this 404 or 400?
if the hmpps ID isn't found
...otlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/services/ExpressionInterestService.kt
Show resolved
Hide resolved
.../kotlin/uk/gov/justice/digital/hmpps/hmppsintegrationapi/exception/MessageFailedException.kt
Show resolved
Hide resolved
val jobId = "5678" | ||
|
||
describe("PUT $basePath/{hmppsId}/expression-of-interest/jobs/{jobId}") { | ||
it("should return 400 Bad Request if ENTITY_NOT_FOUND error occurs") { |
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.
404 vs 400
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.
Do we need a case for invalid Job ID?
Is this testable here? probably not (unless we validate it with JobsBoard API)
.andExpect(content().json(getExpectedResponse("person-adjudications"), true)) | ||
.andExpect(content().json(getExpectedResponse("person-adjudications"))) |
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.
May I recall what this was fixing?
This is not our test.
describe("sendExpressionOfInterest") { | ||
it("should send a valid message successfully to SQS") { | ||
val expressionInterest = ExpressionInterest(jobId = "12345", hmppsId = "H1234") | ||
val messageBody = """{"jobId":"12345","verifiedHmppsId":"H1234"}""" |
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.
Let's review the message body format and define it at the JIRA ticket first.
I do not prefer verifiedHmppsId
as the field name.
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 file is too big to read line by line. I did not locate our actual changes.
It seems formatting the whole file without a need (No actual non-formatting change).
Could you rollback this whole file?
Let's dismiss this PR and start with the new branch (more clean there) |
No description provided.