catching the REsourceNotFound exceptio
This commit is contained in:
parent
14b618bf41
commit
1626dddc97
|
@ -24,6 +24,7 @@ import org.gcube.informationsystem.publisher.scope.ValidatorProvider;
|
|||
import org.gcube.informationsystem.publisher.stubs.registry.RegistryStub;
|
||||
import org.gcube.informationsystem.publisher.stubs.registry.faults.CreateException;
|
||||
import org.gcube.informationsystem.publisher.stubs.registry.faults.InvalidResourceException;
|
||||
import org.gcube.informationsystem.publisher.stubs.registry.faults.ResourceDoesNotExistException;
|
||||
import org.gcube.informationsystem.publisher.stubs.registry.faults.ResourceNotAcceptedException;
|
||||
import org.gcube.informationsystem.publisher.stubs.registry.faults.UpdateException;
|
||||
import org.gcube.informationsystem.publisher.utils.RegistryStubs;
|
||||
|
@ -311,6 +312,8 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
|||
ScopeProvider.instance.set(scope);
|
||||
log.info("remove from IS scope {}",currentScope);
|
||||
registry.getStubs().remove(resource.id(), resource.type().toString());
|
||||
} catch (ResourceDoesNotExistException e) {
|
||||
log.warn("resource not found in the current scope, continue");
|
||||
} catch (Exception e) {
|
||||
log.error("the resource can't be removed ", e);
|
||||
throw new IllegalArgumentException("the resource can't be removed from scope "+currentScope, e);
|
||||
|
|
Loading…
Reference in New Issue