Incorrect validation error message for updating LegalTags - HV000028: Unexpected exception during isValid call
Summary
If you are updating legal tags with invalid request body, the error message is incorrect.
PUT https://osdu.bm-preship.gcp.gnrg-osdu.projects.epam.com/api/legal/v1/legaltags/
Request body:
{
"name": "opendes-Test-Legal-Tag-chad-123456",
"description": "updated desc 2",
"properties": {
"contractId": "123456",
"countryOfOrigin": [
"US",
"CA"
],
"dataType": "Third Party Data",
"exportClassification": "EAR99",
"originator": "Schlumberger",
"personalData": "No Personal Data",
"securityClassification": "Private",
"expirationDate": "2023-07-31"
}
}
Expected Behavior
Response
{
"code": 400,
"reason": "Validation error.",
"message": "The request body is invalid."
}
Actual Behavior
Response
{
"code": 400,
"reason": "Validation error.",
"message": "HV000028: Unexpected exception during isValid call."
}
This is an example of valid request body
{
"name": "osdu-Test-Legal-Tag-chad-123456",
"description": "Legal Tag added for Well",
"contractId": "chad-AE33334",
"expirationDate": "2100-12-21",
"extensionProperties": {
"test_attr": "chad-test"
}
}
Edited by Chad Leong