At the moment if we try to create a new "TermsOfUse" record and send legacyId which is already in use, server would return error with status 500:
{
"message": "Internal server error"
}
It's hard to understand what is wrong with request from this error message.
It would be better to return some particular error message with status 400, like:
{
"message": "TermsOfUse with such 'legacyId' already exists. It should be unique."
}