Преглед изворни кода

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);