diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
index 3565db1..842cabc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
@@ -115,7 +115,7 @@
         }
         else {
             throw new KoralException(StatusCodes.QUERY_TOO_COMPLEX,
-                    "FCS diagnostic 11: Query is too complex.");
+                    "Query is too complex.");
         }
     }
 
@@ -224,7 +224,7 @@
         }
         else {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 48: Layer " + identifier
+                    "Layer " + identifier
                             + " is unsupported.");
         }
 
@@ -257,11 +257,11 @@
         }
         else if (qualifier.equals(FOUNDRY_OPENNLP) && layer.equals("l")) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 48: Layer lemma with qualifier opennlp is unsupported.");
+                    "Layer lemma with qualifier opennlp is unsupported.");
         }
         else if (!supportedFoundries.contains(qualifier)) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 48: Qualifier " + qualifier
+                    "Qualifier " + qualifier
                             + " is unsupported.");
         }
 
@@ -293,7 +293,7 @@
         }
         else {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 37:" + operator.name() + " is unsupported.");
+                    operator.name() + " is unsupported.");
         }
         koralTerm.setOperator(matchOperator);
     }
@@ -330,12 +330,12 @@
 
         if (names.size() == 1) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 48: Regexflag: " + names.get(0)
+                    "Regexflag: " + names.get(0)
                             + " is unsupported.");
         }
         else if (names.size() > 1) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                    "SRU diagnostic 48: Regexflags: " + names.toString()
+                    "Regexflags: " + names.toString()
                             + " are unsupported.");
         }
     }
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
index fc0cfcf..98f6536 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
@@ -70,7 +70,7 @@
         }
         else {
             throw new KoralException(StatusCodes.QUERY_TOO_COMPLEX,
-                    "FCS diagnostic 11:" + queryNode.getNodeType().name()
+                    queryNode.getNodeType().name()
                             + " is currently unsupported.");
         }
     }
@@ -142,7 +142,7 @@
     private KoralSpan parseWithinScope(Scope scope) throws KoralException {
         if (scope == null) {
             throw new KoralException(StatusCodes.MALFORMED_QUERY,
-                    "FCS diagnostic 11: Within context is missing.");
+                    "Within context is missing.");
         }
 
         KoralContext contextSpan;
@@ -157,7 +157,7 @@
         }
         else {
             throw new KoralException(StatusCodes.QUERY_TOO_COMPLEX,
-                    "FCS diagnostic 11: Within scope " + scope.toString()
+                    "Within scope " + scope.toString()
                             + " is currently unsupported.");
         }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
index 06036ad..3717cba 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
@@ -70,12 +70,12 @@
     private boolean isVersionValid() {
         if (version == null || version.isEmpty()) {
             addError(StatusCodes.MISSING_VERSION,
-                    "SRU diagnostic 7: Version number is missing.");
+                    "Version number is missing.");
             return false;
         }
         else if (!version.equals(VERSION_2_0)) {
-            addError(StatusCodes.MISSING_VERSION,
-                    "SRU diagnostic 5: Only supports SRU version 2.0.");
+            addError(StatusCodes.UNSUPPORTED_VERSION,
+                    "Only supports SRU version 2.0.");
             return false;
         }
         return true;
@@ -88,25 +88,24 @@
     private FCSSRUQuery parseQueryStringtoFCSQuery(String query) {
         if ((query == null) || query.isEmpty())
             addError(StatusCodes.NO_QUERY,
-                    "SRU diagnostic 1: No query has been passed.");
+                    "No query has been passed.");
         FCSSRUQuery fcsQuery = null;
         try {
             QueryNode parsedQuery = fcsParser.parse(query);
             fcsQuery = new FCSSRUQuery(query, parsedQuery);
             if (fcsQuery == null) {
                 addError(StatusCodes.UNKNOWN_QUERY_ERROR,
-                        "FCS diagnostic 10: Unexpected error while parsing query.");
+                        "Unexpected error while parsing query.");
             }
         }
         catch (QueryParserException e) {
             addError(
                     StatusCodes.UNKNOWN_QUERY_ERROR,
-                    "FCS diagnostic 10: Query cannot be parsed, "
+                    "Query cannot be parsed, "
                             + e.getMessage());
         }
         catch (Exception e) {
-            addError(StatusCodes.UNKNOWN_QUERY_ERROR, "FCS diagnostic 10: "
-                    + "Unexpected error while parsing query.");
+            addError(StatusCodes.UNKNOWN_QUERY_ERROR, "Unexpected error while parsing query.");
         }
         return fcsQuery;
     }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/util/StatusCodes.java b/src/main/java/de/ids_mannheim/korap/query/serialize/util/StatusCodes.java
index 1f896b3..8a7f6e0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/util/StatusCodes.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/util/StatusCodes.java
@@ -10,6 +10,7 @@
 	public final static int UNKNOWN_QUERY_LANGUAGE = 307;
     public final static int UNBOUND_ANNIS_RELATION = 308;
 	public final static int MISSING_VERSION = 309;
-	public final static int QUERY_TOO_COMPLEX = 310;
+	public final static int UNSUPPORTED_VERSION = 310;
+	public final static int QUERY_TOO_COMPLEX = 311;
 	public final static int UNKNOWN_QUERY_ERROR = 399;
 }
\ No newline at end of file
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
index 973c838..990f611 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
@@ -382,9 +382,9 @@
         query = "[cnx:pos=\"VVFIN\"] within u";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
-        assertEquals(310, error.get(0));
+        assertEquals(311, error.get(0));
         assertEquals(
-                "FCS diagnostic 11: Within scope UTTERANCE is currently unsupported.",
+                "Within scope UTTERANCE is currently unsupported.",
                 (String) error.get(1));
     }
 
@@ -428,31 +428,30 @@
 
     @Test
     public void testWrongQuery() throws IOException {
+        
+        String errorMessage = "Query cannot be parsed, an unexpcected occured exception while parsing";
+        
         // expression should always be within a segment
         query = "!(mate:lemma=\"sein\" | mate:pos=\"PPOSS\")";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
         assertEquals(399, error.get(0));
-        assertEquals(true,
-                error.get(1).toString().startsWith("FCS diagnostic 10"));
+        assertEquals(errorMessage, error.get(1).toString());
 
         query = "![mate:lemma=\"sein\" | mate:pos=\"PPOSS\"]";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
-        assertEquals(true,
-                error.get(1).toString().startsWith("FCS diagnostic 10"));
+        assertEquals(errorMessage, error.get(1).toString());
 
         query = "(\"blaue\"&\"grüne\")";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
-        assertEquals(true,
-                error.get(1).toString().startsWith("FCS diagnostic 10"));
+        assertEquals(errorMessage, error.get(1).toString());
 
         query = "[pos=\"NN\"]&[text=\"Mann\"]";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
         assertEquals(399, error.get(0));
-        String msg = (String) error.get(1);
-        assertEquals(true, msg.startsWith("FCS diagnostic 10"));
+        assertEquals(errorMessage, error.get(1).toString());
     }
 }
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessorTest.java
index 407e6bd..8fa70df 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessorTest.java
@@ -48,13 +48,13 @@
     @Test
     public void testVersion() throws JsonProcessingException {
         error = getError(new FCSQLQueryProcessor("\"Sonne\"", "1.0"));
-        assertEquals(309, error.get(0));
-        assertEquals("SRU diagnostic 5: Only supports SRU version 2.0.",
+        assertEquals(310, error.get(0));
+        assertEquals("Only supports SRU version 2.0.",
                 error.get(1));
 
         error = getError(new FCSQLQueryProcessor("\"Sonne\"", null));
         assertEquals(309, error.get(0));
-        assertEquals("SRU diagnostic 7: Version number is missing.",
+        assertEquals("Version number is missing.",
                 error.get(1));
     }
 
@@ -117,14 +117,14 @@
                 "2.0"));
         assertEquals(306, error.get(0));
         String msg = (String) error.get(1);
-        assertEquals(true, msg.startsWith("SRU diagnostic 48: Regexflags"));
+        assertEquals(true, msg.startsWith("Regexflags"));
 
         query = "\"Fliegen\" /d";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
         assertEquals(306, error.get(0));
         assertEquals(
-                "SRU diagnostic 48: Regexflag: IGNORE_DIACRITICS is unsupported.",
+                "Regexflag: IGNORE_DIACRITICS is unsupported.",
                 (String) error.get(1));
     }
 
@@ -300,7 +300,7 @@
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(399, error.get(0));
         assertEquals(
-                "FCS diagnostic 10: Query cannot be parsed, an unexpcected occured exception while parsing",
+                "Query cannot be parsed, an unexpcected occured exception while parsing",
                 error.get(1));
     }
 
@@ -311,34 +311,34 @@
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(306, error.get(0));
         assertEquals(
-                "SRU diagnostic 48: Layer lemma with qualifier opennlp is unsupported.",
+                "Layer lemma with qualifier opennlp is unsupported.",
                 error.get(1));
 
         query = "[tt:morph = \"sein\"]";
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(306, error.get(0));
-        assertEquals("SRU diagnostic 48: Layer morph is unsupported.",
+        assertEquals("Layer morph is unsupported.",
                 error.get(1));
 
         // unsupported qualifier
         query = "[malt:lemma = \"sein\"]";
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(306, error.get(0));
-        assertEquals("SRU diagnostic 48: Qualifier malt is unsupported.",
+        assertEquals("Qualifier malt is unsupported.",
                 error.get(1));
 
         // unsupported layer
         query = "[cnx:morph = \"heit\"]";
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(306, error.get(0));
-        assertEquals("SRU diagnostic 48: Layer morph is unsupported.",
+        assertEquals("Layer morph is unsupported.",
                 error.get(1));
 
         // missing layer
         query = "[cnx=\"V\"]";
         error = getError(new FCSQLQueryProcessor(query, "2.0"));
         assertEquals(306, error.get(0));
-        assertEquals("SRU diagnostic 48: Layer cnx is unsupported.",
+        assertEquals("Layer cnx is unsupported.",
                 error.get(1));
     }
 }
