diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 56a7e547ec6723ba92a1c203490a10050cf079f7..6c900f0f22433f9a54651d1c4f5512f501531014 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -269,7 +269,7 @@ class OC_Mount_Config {
 				}
 			} catch (Exception $exception) {
 				\OCP\Util::logException('files_external', $exception);
-				throw $e;
+				throw $exception;
 			}
 		}
 		return self::STATUS_ERROR;