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

NPE when sending an invalid content with an invalid operationdefinition on Translate #2723

Closed
prb112 opened this issue Aug 25, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@prb112
Copy link
Contributor

prb112 commented Aug 25, 2021

Describe the bug
at com.ibm.fhir.server.util.FHIROperationUtil.getInputParameters(FHIROperationUtil.java:162)
Generates an NPE

Environment
Which version of IBM FHIR Server?
4.9.0

To Reproduce
POST /fhir-server/api/v4/ConceptMap/$translate HTTP/2
User-Agent: PostmanRuntime/7.28.0
Accept: /
Cache-Control: no-cache
Accept-Encoding: gzip, deflate
Content-Length: 1181
{
"resourceType": "ConceptMap",
"id": "snomed-ucum",
"url": "http://ibm.com/fhir/ConceptMap/snomed-ucum",
"version": "0.1.0",
"status": "draft",
"sourceCanonical": "http://snomed.info/sct?fhir_vs",
"targetCanonical": "http://hl7.org/fhir/ValueSet/ucum-common",
"group": [
{
"source": "http://snomed.info/sct",
"target": "http://unitsofmeasure.org",
"targetVersion": "2015",
"element": [
{
"code": "258672001",
"target": [
{
"code": "cm",
"equivalence": "equivalent",
"comment": "exact match"
}
]
},
{
"code": "258773002",
"target": [
{
"code": "mL",
"equivalence": "equivalent",
"comment": "exact match"
}
]
}
]
}
]
}
HTTP/2 500 Internal Server Error
Date: Tue, 24 Aug 2021 06:42:21 GMT
Content-Type: application/fhir+json
Content-Length: 258
Content-Language: en-US
Strict-Transport-Security: max-age=15724800; includeSubDomains
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "fatal",
"code": "exception",
"details": {
"text": "NullPointerException: <null message>"
}
}
]
}

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@prb112 prb112 added the bug Something isn't working label Aug 25, 2021
JohnTimm added a commit that referenced this issue Aug 25, 2021
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
prb112 added a commit that referenced this issue Aug 25, 2021
Issue #2723 - avoid NPE in getInputParameters
@prb112
Copy link
Contributor Author

prb112 commented Aug 31, 2021

QA: Confirm that this works as designed, and is resilient to bad data.

@prb112 prb112 closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants