diff --git a/libs/utils/src/main/java/com/akto/stigg/StiggReporterClient.java b/libs/utils/src/main/java/com/akto/stigg/StiggReporterClient.java index bcd382fa7..5d51d7f92 100644 --- a/libs/utils/src/main/java/com/akto/stigg/StiggReporterClient.java +++ b/libs/utils/src/main/java/com/akto/stigg/StiggReporterClient.java @@ -68,8 +68,14 @@ private String executeGraphQL(String query, String vars) throws IllegalStateExce // Execute the request and get the response try (Response response = client.newCall(request).execute()) { - String[] queryTypes = query.split("("); - String queryString = queryTypes[0]; + String queryString = ""; + try { + String[] queryTypes = query.split("\\("); + queryString = queryTypes[0]; + } catch (Exception e) { + loggerMaker.logger.info("Error in splitting regex"); + } + if (!response.isSuccessful()) { throw new IOException("Unexpected response code: " + response);