Commit bf907d6b authored by neelesh thakur's avatar neelesh thakur
Browse files

comments

parent dc11f5fc
Pipeline #51505 passed with stages
in 43 minutes and 16 seconds
......@@ -85,7 +85,7 @@ public class ScrollQueryServiceAwsImpl extends QueryBase implements IScrollQuery
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
......@@ -85,7 +85,7 @@ public class ScrollQueryServiceImpl extends QueryBase implements IScrollQuerySer
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
......@@ -92,7 +92,7 @@ public class ScrollQueryServiceImpl extends QueryBase implements IScrollQuerySer
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
......@@ -85,7 +85,7 @@ public class ScrollQueryServiceImpl extends QueryBase implements IScrollQuerySer
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
......@@ -79,7 +79,7 @@ public class ScrollQueryServiceImpl extends QueryBase implements IScrollQuerySer
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
......@@ -81,7 +81,7 @@ public class ScrollQueryServiceImpl extends QueryBase implements IScrollQuerySer
return this.initCursorQuery(searchRequest, client);
} catch (AppException e) {
if (this.exceptionParser.parseException(e).stream().anyMatch(r -> r.contains("Trying to create too many scroll contexts. Must be less than or equal to:"))) {
throw new AppException(429, "Too many request", "Too many cursor request, please re-try after some time.", e);
throw new AppException(429, "Too many requests", "Too many cursor requests, please re-try after some time.", e);
}
throw e;
}
......
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