From 4ce469b3507b4d62cb1a48f2fc70ece3d04ec337 Mon Sep 17 00:00:00 2001 From: eblondel Date: Fri, 23 Feb 2024 00:19:28 +0100 Subject: [PATCH] #121 additional control --- R/OWSHttpRequest.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/OWSHttpRequest.R b/R/OWSHttpRequest.R index 01704f7..3cf2da3 100644 --- a/R/OWSHttpRequest.R +++ b/R/OWSHttpRequest.R @@ -242,7 +242,7 @@ OWSHttpRequest <- R6Class("OWSHttpRequest", writeBin(req$response, exception_tmp_file) xmlObj = try(XML::xmlParse(exception_tmp_file), silent = TRUE) } - if(!is(xmlObj, "try-error")) if(!is.null(xmlNamespaces(xmlObj)$ows)){ + if(!is(xmlObj, "try-error")) if(is(xmlObj, "XMLInternalNode")) if(!is.null(xmlNamespaces(xmlObj)$ows)){ exception <- getNodeSet(xmlObj, "//ows:Exception", c(ows = xmlNamespaces(xmlObj)$ows$uri)) if(length(exception)>0){ exception <- OWSException$new(xmlObj = exception[[1]])