no longer repackaging missing data exceptions as io exceptions when loading json data for indices

This commit is contained in:
kennycud 2025-06-14 13:11:19 -07:00
parent 47e313067f
commit 89236d6504

View File

@ -111,6 +111,8 @@ public class ArbitraryIndexUtils {
indexDetails.add( new ArbitraryDataIndexDetail(indexResource.name, rank, indices.get(rank - 1), indexResource.identifier )); indexDetails.add( new ArbitraryDataIndexDetail(indexResource.name, rank, indices.get(rank - 1), indexResource.identifier ));
} }
} catch (MissingDataException e) {
LOGGER.warn( e.getMessage() );
} catch (InvalidFormatException e) { } catch (InvalidFormatException e) {
LOGGER.debug("invalid format, skipping: " + indexResource); LOGGER.debug("invalid format, skipping: " + indexResource);
} catch (UnrecognizedPropertyException e) { } catch (UnrecognizedPropertyException e) {
@ -191,7 +193,7 @@ public class ArbitraryIndexUtils {
} }
} }
public static String getJson(String name, String identifier) throws IOException { public static String getJson(String name, String identifier) throws IOException, MissingDataException {
try { try {
ArbitraryDataReader arbitraryDataReader ArbitraryDataReader arbitraryDataReader
@ -209,7 +211,7 @@ public class ArbitraryIndexUtils {
} catch (MissingDataException e) { } catch (MissingDataException e) {
if (attempts > maxAttempts) { if (attempts > maxAttempts) {
// Give up after 5 attempts // Give up after 5 attempts
throw new IOException("Data unavailable. Please try again later."); throw e;
} }
} }
} }