Skip to content

Commit bfbbf8a

Browse files
NRL-1215 Fix error code for duplicates
1 parent d079bce commit bfbbf8a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

layer/nrlf/core/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def raise_when_duplicate_keys(json_content: str) -> None:
109109
if duplicates:
110110
raise OperationOutcomeError(
111111
severity="error",
112-
code="required",
112+
code="invalid",
113113
details=SpineErrorConcept.from_code("MESSAGE_NOT_WELL_FORMED"),
114114
diagnostics=f"Duplicate keys found in FHIR document: {duplicates}",
115115
expression=paths,

layer/nrlf/core/tests/test_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_parse_body_valid_docref_with_duplicate_key():
170170
"issue": [
171171
{
172172
"severity": "error",
173-
"code": "required",
173+
"code": "invalid",
174174
"details": {
175175
"coding": [
176176
{

0 commit comments

Comments
 (0)