diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java index b64702a..cba9d60 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java @@ -73,7 +73,9 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { ERType erType = delegate.make(call); logger.info("Got {} with UUID {} is {}", type, uuid, erType); return erType; - + } catch (ResourceRegistryException e) { + logger.error("Error while getting {} with UUID {}", type, uuid, e); + throw e; } catch (Exception e) { logger.error("Error while getting {} with UUID {}", type, uuid, e); throw new ResourceRegistryException(e); @@ -107,7 +109,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { logger.info("Got instances of {} are {}", type, ret); return ISMapper.unmarshalList(Entity.class, ret); - + + } catch (ResourceRegistryException e) { + logger.error("Error while getting {} instances", type, e); + throw e; } catch (Exception e) { logger.error("Error while getting {} instances", type, e); throw new ResourceRegistryException(e); @@ -146,7 +151,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { reference.toString(), ret); return ISMapper.unmarshalList(Resource.class, ret); - + + } catch (ResourceRegistryException e) { + logger.error("Error while getting instances of {} from/to {}", relationType, e); + throw e; } catch (Exception e) { logger.error("Error while getting instances of {} from/to {}", relationType, e); throw new ResourceRegistryException(e); @@ -181,7 +189,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { logger.info("Got schema for {} is {}", type, schema); return TypeBinder.deserializeTypeDefinitions(schema); - + + } catch (SchemaNotFoundException e) { + logger.error("Error while getting {}schema for {}", + polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "", + type, e); + throw e; } catch (Exception e) { logger.error("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",