GitHub user tmess567 opened a pull request:
https://github.com/apache/syncope/pull/18
Added Exception for existing key (SYNCOPE-866)
I have added a new Exception named **KeyAlreadyExistsException** and
attached it to the **MailTemplateLogic** and **ReportTemplateLogic** classes to
check for duplicate keys and throw the new Exception.
I have also tested this out on Swagger and attached screenshots of the
error for both **MailTemplates**

and **ReportTemplates**.

You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tmess567/syncope SYNCOPE-866
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/syncope/pull/18.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18
----
commit 42ecce4b5b35f7b540c77b65faf39f6b1bd9b7db
Author: Tushar <[email protected]>
Date: 2016-06-03T07:54:02Z
Added Exception for existing key (SYNCOPE-866)
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---