if (target == null || target.getType() == TargetType.TYPE_NOT_FOUND) {
return ProviderHelper.notfound(request);
}
TargetType type = target.getType();
RequestProcessor processor = this.requestProcessors.get(type);
if (processor == null) {
return ProviderHelper.notfound(request);
}
WorkspaceManager wm = getWorkspaceManager(request);
CollectionAdapter adapter = wm.getCollectionAdapter(request);
Transactional transaction = adapter instanceof Transactional ? (Transactional) adapter : null;
ResponseContext response = null;
try {
transactionStart(transaction, request);
response = processor.process(request, wm, adapter);
response = response != null ? response : processExtensionRequest(request, adapter);
} catch (Throwable e) {
if (e instanceof ResponseContextException) {
ResponseContextException rce = (ResponseContextException) e;
if (rce.getStatusCode() >= 400 && rce.getStatusCode() < 500) {