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

Merge branch 'gcp-timeout-exception-search' into 'master'

Gcp timeout exception search (GONRG-2509)

See merge request !125
parents 664239f3 31ce75c2
Pipeline #45615 passed with stages
in 55 minutes and 58 seconds
......@@ -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