瀏覽代碼

Throw error on missing response file

shalvah 3 年之前
父節點
當前提交
123e64b820
共有 1 個文件被更改,包括 1 次插入7 次删除
  1. 1 7
      src/Extracting/Strategies/Responses/UseResponseFileTag.php

+ 1 - 7
src/Extracting/Strategies/Responses/UseResponseFileTag.php

@@ -55,13 +55,7 @@ class UseResponseFileTag extends Strategy
             if (!file_exists($filePath)) {
                 // Try Laravel storage folder
                 if (!file_exists(storage_path($filePath))) {
-                    c::warn("@responseFile {$filePath} does not exist");
-
-                    return [
-                        'content' => null,
-                        'status' => (int)$status,
-                        'description' => $description,
-                    ];
+                    throw new \InvalidArgumentException("@responseFile {$filePath} does not exist");
                 }
 
                 $filePath = storage_path($filePath);