Skip to content

Beautiful Open-Source Form Builder

improve s3key exception (#661)

Chirag Chhatralab0311257ac6d
diff --git a/api/app/Service/Storage/S3KeyCleaner.php b/api/app/Service/Storage/S3KeyCleaner.php
index 5855f1888..2fb717bb2 100644
--- a/api/app/Service/Storage/S3KeyCleaner.php
+++ b/api/app/Service/Storage/S3KeyCleaner.php
@@ -42,7 +42,7 @@ class S3KeyCleaner
}
if (!$objectKey || (!is_string($objectKey) && !is_numeric($objectKey))) {
- throw new \Exception("Expected non-empty string or number, got ${objectKey}");
+ throw new \Exception("Invalid object key: Expected non-empty string or number, received " . (is_object($objectKey) ? get_class($objectKey) : gettype($objectKey)));
}
if (is_numeric($objectKey)) {