Modify DX API V2 error message

Is there any way we could modify the error message for the DX API V2 . On patch api if we pass the wrong etag value below error is returned currently-

{
“errorClassification”: “Resource is stale”,
“localizedValue”: “Resource was last read prior to newer changes.”,
“errorDetails”: [
{
“message”: “Error_Stale_Resource”,
“erroneousInputOutputFieldInPage”: “”,
“erroneousInputOutputIdentifier”: “”,
“errorClassification”: “”,
“localizedValue”: “Another requestor has updated the Case since it was last read. Please refresh the form and resubmit your changes.”,
“messageParameters”: [

]
}
]
}

Like in the error details localized value i need to add the case id.

“localizedValue”: " For X-1234 Another requestor has updated the Case since it was last read. Please refresh the form and resubmit your changes.",

Is it possible to modify the error details localized value?

@AnkitB38

I hope you can modify the error message in Error_Stale_Resource Message rule. Please find the attached screenshot for your reference.

@RameshSangili Thanks for the reply.
I want to append the message with the case id.
Which attribute we need to add it in the parameters to append the case id in the error message?
And could we append the attributes from the case clipboard page in the error message?

Regards,
Ankit

@AnkitB38
We can modify the declare expression rule pyLocalizedValue of class Embed-AutomationRule-ErrorDetails to update the error message of DX API V2.

@AnkitB38

You can pass the parameters to display the error message with the case id. Please find the screenshot attached for your reference.