This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 8ba8273518839ace7f4927f2aa60d4fc21b1b6b1 Merge: 67d837a220 e5236fd0d9 Author: Michael Blow <[email protected]> AuthorDate: Mon Nov 18 18:53:50 2024 -0500 Merge branch 'gerrit/trinity' into 'gerrit/goldfish' Ext-ref: MB-64269 Change-Id: I35b32ae2ded466ed4707776aacb9d9be496d2be8 .../java/org/apache/asterix/external/util/google/gcs/GCSUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --cc asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/google/gcs/GCSUtils.java index 50c75ffbbf,a7f74a91b8..5274c44a38 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/google/gcs/GCSUtils.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/google/gcs/GCSUtils.java @@@ -103,14 -99,17 +103,17 @@@ public class GCSUtils try { builder.setCredentials(GoogleCredentials.getApplicationDefault()); - } catch (IOException ex) { + } catch (Exception ex) { - throw CompilationException.create(EXTERNAL_SOURCE_ERROR, getMessageOrToString(ex)); + throw CompilationException.create(EXTERNAL_SOURCE_ERROR, ex, getMessageOrToString(ex)); } } else if (jsonCredentials != null) { try (InputStream credentialsStream = new ByteArrayInputStream(jsonCredentials.getBytes())) { builder.setCredentials(GoogleCredentials.fromStream(credentialsStream)); } catch (IOException ex) { - throw new CompilationException(EXTERNAL_SOURCE_ERROR, ex, getMessageOrToString(ex)); - throw CompilationException.create(EXTERNAL_SOURCE_ERROR, getMessageOrToString(ex)); ++ throw CompilationException.create(EXTERNAL_SOURCE_ERROR, ex, getMessageOrToString(ex)); + } catch (Exception ex) { + throw new CompilationException(EXTERNAL_SOURCE_ERROR, + "Encountered an issue while processing the JSON credentials. Please ensure the provided credentials are valid."); } } else { builder.setCredentials(NoCredentials.getInstance());
