JS: log an error when the user tries to rename an Entity to a name already in use

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>