Commit 31ce75c2 authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP]
Browse files

Gcp timeout exception search (GONRG-2509)

parent 664239f3
......@@ -377,6 +377,9 @@ abstract class QueryBase {
}
throw new AppException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, SEARCH_ERROR_MSG, ERROR_PROCESSING_SEARCH_REQUEST_MSG, e);
} catch (Exception e) {
if(e instanceof java.net.SocketTimeoutException){
throw new AppException(HttpServletResponse.SC_REQUEST_TIMEOUT, SEARCH_ERROR_MSG, String.format("Request timed out after waiting for %sm", requestTimeout.getMinutes()), e);
}
throw new AppException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, SEARCH_ERROR_MSG, ERROR_PROCESSING_SEARCH_REQUEST_MSG, e);
} finally {
Long latency = System.currentTimeMillis() - startTime;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment