[Enhancement] User friendly error message when AWS parseRegion gets error (#27498)

User friendly error message when AWS parseRegion gets error
This commit is contained in:
Zhenxiao Luo 2023-07-24 19:25:27 -07:00 committed by GitHub
parent 71ca94a03d
commit 54d0f54a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -1216,6 +1216,12 @@ public class HdfsFsManager {
} catch (FileNotFoundException e) {
LOG.info("file not found: " + path, e);
throw new UserException("file not found: " + path, e);
} catch (IllegalArgumentException e) {
LOG.error("The arguments of blob store(S3/Azure) may be wrong. You can check " +
"the arguments like region, IAM, instance profile and so on.");
throw new UserException("The arguments of blob store(S3/Azure) may be wrong. " +
"You can check the arguments like region, IAM, " +
"instance profile and so on.", e);
} catch (Exception e) {
LOG.error("errors while get file status ", e);
throw new UserException("listPath failed", e);

View File

@ -905,6 +905,13 @@ public class FileSystemManager {
logger.info("file not found: " + e.getMessage());
throw new BrokerException(TBrokerOperationStatusCode.FILE_NOT_FOUND,
e, "file not found");
} catch (IllegalArgumentException e) {
logger.error("The arguments of blob store(S3/Azure) may be wrong. You can check " +
"the arguments like region, IAM, instance profile and so on.");
throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,
e, "The arguments of blob store(S3/Azure) may be wrong. " +
"You can check the arguments like region, IAM, " +
"instance profile and so on.");
} catch (Exception e) {
logger.error("errors while get file status ", e);
throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,