NHSDigital / summary-care-record-api

Other
4 stars 5 forks source link

Update consent: Structural issue - Missing NHS number value is giving 500 internal server error #180

Closed sonalVarma closed 3 years ago

sonalVarma commented 3 years ago

Describe the bug The nhs number value is required in payload. If we are not passing it , then it is giving 500 internal server error "part": [ { "name": "nhsNumber", "valueString": "9693044479" }, { "name": "permissionCode",

To Reproduce Attached request - Missing nhs number value field.txt

Expected behavior This can be treated as structural/syntax issue and should give invalid response possibly, 400 - Bad request.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

@michael-kainos @dawidskainos

dawidskainos commented 3 years ago

Will add a fix in next release version

dawidskainos commented 3 years ago

Will be fixed in https://gpitbjss.atlassian.net/browse/NIAD-1209

dawidskainos commented 3 years ago

Deployed to INT and ready for re-test.

sonalVarma commented 3 years ago

@dawidskainos , The issue is fixed now. The response code received is 400 - Bad request with response body - { "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "value", "details": { "text": "Parameter.Part named 'nhsNumber' with not empty value not found" } } ] }

Can you please once check the error text message . with not empty value not found

dawidskainos commented 3 years ago

@sonalVarma I changed the error message. I hope it makes more sense now. Ready for retest.

sonalVarma commented 3 years ago

{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "value", "details": { "text": "Missing value for Parameter.Part 'nhsNumber'" } } ] }