From 48d51f61ac53ca79678b849dfc40b6619af7be1a Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Mon, 22 Oct 2018 12:55:41 +0000 Subject: [PATCH] added another check git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@173748 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../datatransfer/resolver/services/StorageManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/StorageManager.java b/src/main/java/org/gcube/datatransfer/resolver/services/StorageManager.java index 6da75e2..a8dab07 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/StorageManager.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/StorageManager.java @@ -101,15 +101,14 @@ public class StorageManager { try{ iClient = client.getClient(); toSEID = iClient.getId(storageId); //to Storage Encrypted ID - logger.debug("Decoded ID"+" = "+ toSEID); + logger.info("Decoded ID"+" = "+ toSEID); }catch(Exception e){ logger.error("Storage Client Exception when getting file from storage: ", e); throw new InternalServerException(httpRequest, Status.INTERNAL_SERVER_ERROR, "Storage Client Exception when getting file from storage with id: "+storageId, StorageManager.class); - //throw new WebApplicationException("Storage Client Exception when getting file from storage with id: "+storageId, Status.INTERNAL_SERVER_ERROR); } - if(toSEID==null){ - logger.error("Decrypted id for storageId: "+storageId +" is null!"); + if(toSEID==null || toSEID.isEmpty()){ + logger.error("Decrypted id for storageId: "+storageId +" is null or empty!"); throw new WrongParameterException(httpRequest, Status.BAD_REQUEST, "Error on decrypting the "+STORAGE_ID+ " '"+storageId+"'. Is it a valid id?", StorageManager.class); }