Skip to content

Commit 666793a

Browse files
committed
409 code on duplicate enrollments
When a a message contains word "duplicate", the status code will be set to 409.
1 parent 1ff839f commit 666793a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/mule/main-api.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
</on-error-propagate>
170170
<on-error-propagate enableNotifications="true" logException="true" doc:name="On Error Propagate" doc:id="67896d39-b9c7-4032-9762-8194362c31d7" type="CUSTOM:CUSTOM_ERROR">
171171
<choice doc:name="Choice" doc:id="1c191d29-1312-4e97-a1a9-f5d37d8be49a">
172-
<when expression='#[(vars.errorCustomType contains "DUPLICATES_DETECTED") or (vars.errorCustomMessage contains "DUPLICATES_DETECTED" )]'>
172+
<when expression='#[(vars.errorCustomType contains "DUPLICATES_DETECTED") or (lower(vars.errorCustomMessage) contains "duplicate")]'>
173173
<set-variable value="409" doc:name="Set Status Code" doc:id="ce66e384-6022-462c-ba5e-342621113bb5" variableName="httpStatus" />
174174
<set-variable value='#[vars.errorCustomType replace "UNKNOWN" with "DUPLICATES_DETECTED"]' doc:name="Update errorCustomType" doc:id="fa24b860-a1da-478a-8fcb-4c209b129de7" variableName="errorCustomType" />
175175
</when>

0 commit comments

Comments
 (0)