diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index 6fe9d26614e790682e1e73455b181d19dc59bb2e..a7b8ea1755efda618fefa9b7b1d59325f5e059c1 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -150,11 +150,11 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
 			$node->acquireLock(ILockingProvider::LOCK_SHARED);
 			return $node->put($data);
 		} catch (\OCP\Files\StorageNotAvailableException $e) {
-			throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
+			throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage(), $e->getCode(), $e);
 		} catch (InvalidPathException $ex) {
-			throw new InvalidPath($ex->getMessage());
+			throw new InvalidPath($ex->getMessage(), false, $ex);
 		} catch (ForbiddenException $ex) {
-			throw new Forbidden($ex->getMessage(), $ex->getRetry());
+			throw new Forbidden($ex->getMessage(), $ex->getRetry(), $ex);
 		} catch (LockedException $e) {
 			throw new FileLocked($e->getMessage(), $e->getCode(), $e);
 		}
diff --git a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
index 9d60b227612918789e9f1f7b05f971e34fbc3437..346e21adc9dbe97b45ce54100e1c48773e94e0b5 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
@@ -36,9 +36,10 @@ class InvalidPath extends Exception {
 	/**
 	 * @param string $message
 	 * @param bool $retry
+	 * @param \Exception|null $previous
 	 */
-	public function __construct($message, $retry = false) {
-		parent::__construct($message);
+	public function __construct($message, $retry = false, \Exception $previous = null) {
+		parent::__construct($message, 0, $previous);
 		$this->retry = $retry;
 	}