[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:
parent
71ca94a03d
commit
54d0f54a52
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue