Handle Custom Object unique constraint error

Is there a way to reliable identify errors thrown when creating a custom object due to unique constraint/the object already exists?

An example error response from a sandbox account is below. Is the error body reliable or possibly differ in the future?

Error: HTTP-Code: 400

Message: An error occurred.

Body: {“status”:“error”,“message”:“Cannot set PropertyValueCoordinates{objectTypeId=ObjectTypeId{metaTypeId=2}, propertyName=line_id, value=robyn-test-id} on XXXX259. XXXX905 already has that value.”,

“category”:“VALIDATION_ERROR”}

Hi, @robyn1 :waving_hand: Are you asking if there is set list of error responses for this endpoint? Or something you can reference?

Thanks for clarifying! — Jaycee

Hey @Jaycee_Lewis , I’m looking for a set list of error responses for this endpoint. I really only need a reliable way to check the error above was thrown. We want to catch this error and respond by using the search endpoint vs throwing in all other instences.

Is the error body text reliable to query or likely to change?