diff --git a/lib/query.py b/lib/query.py
index d0ffbeeb1e732b24a5f8d3292bf5d0c646063d43..d8b471884f8c3c850261752954640949c27aa48f 100644
--- a/lib/query.py
+++ b/lib/query.py
@@ -23,6 +23,8 @@ class LTAClientExistsAlready(Exception):
 class LTAClientError(Exception):
     pass
 
+class LTAIDAlreadyExists(Exception):
+    pass
 
 def lta_on_error_print(func):
     def wrapper(*args, **kwargs):
@@ -147,7 +149,7 @@ def create_unique_id(source, userlabel=None):
     if not response.get("result") == "ok":
         raise Exception('An identifier for this userlabel could not be created -> ' + str(response.get("error")))
     if not response.get("is_new"):
-        raise Exception('An identifier for this userlabel already exists -> ' + str(userlabel))
+        raise LTAIDAlreadyExists('An identifier for this userlabel already exists -> ' + str(userlabel))
     return response.get('id')