Skip to content
Snippets Groups Projects
Commit b0ae9885 authored by Savchuk Mykyta's avatar Savchuk Mykyta Committed by Mykyta Savchuk
Browse files

No retry on storage 500

parent e8a23c6b
No related branches found
No related tags found
1 merge request!454No retry on storage 500
......@@ -116,6 +116,10 @@ public class StorageServiceImpl implements StorageService {
throw new AppException(HttpStatus.SC_NOT_FOUND, "Invalid request", "Storage service returned empty response");
}
if (response.getResponseCode() == 500) {
throw new AppException(295, "Server error", "Storage service unknown error");
}
Records records = null;
try {
records = this.objectMapper.readValue(bulkStorageData, Records.class);
......@@ -231,4 +235,5 @@ public class StorageServiceImpl implements StorageService {
JsonElement results = asJsonObject.get("results");
return response.getResponseCode() != HttpStatus.SC_OK ? null : this.gson.fromJson(results,List.class);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment