From 87894ad5591638a79b01ed21e5c139d393c2841e Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 15 Jan 2026 08:44:06 +1100 Subject: [PATCH 1/2] Untracked: Sets either 404 or 422 as potential responses. --- R/DataMart.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DataMart.R b/R/DataMart.R index 85776eb..25d588d 100644 --- a/R/DataMart.R +++ b/R/DataMart.R @@ -343,7 +343,7 @@ QSaveData <- function(object, filename, compression.file.size.threshold = NULL, if (!has.errored && res$status_code == 413) # 413 comes from IIS when we violate its web.config limits stopBadRequest(res, "Could not write to Displayr Cloud Drive. Data to write is too large.") - else if (!has.errored && res$status_code == 404) + else if (!has.errored && (res$status_code == 404 || res$status_code == 422)) { stop("QSaveData has encountered an unknown error. ", "404: The file could not properly be saved. ", From 49eec3d0e2aad65636271cd757e5908a32118fba Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 15 Jan 2026 08:49:05 +1100 Subject: [PATCH 2/2] Mention either response code. --- R/DataMart.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/R/DataMart.R b/R/DataMart.R index 25d588d..121e5e1 100644 --- a/R/DataMart.R +++ b/R/DataMart.R @@ -343,7 +343,13 @@ QSaveData <- function(object, filename, compression.file.size.threshold = NULL, if (!has.errored && res$status_code == 413) # 413 comes from IIS when we violate its web.config limits stopBadRequest(res, "Could not write to Displayr Cloud Drive. Data to write is too large.") - else if (!has.errored && (res$status_code == 404 || res$status_code == 422)) + else if (!has.errored && res$status_code == 422) + { + stop("QSaveData has encountered an unknown error. ", + "422: The file could not properly be saved. ", + "The likely cause was an incorrect path preceding the filename, or insufficient access to the file path.") + } + else if (!has.errored && res$status_code == 404) { stop("QSaveData has encountered an unknown error. ", "404: The file could not properly be saved. ",