1
0
forked from poc/pds

Refactor error responses in readFiles method to standardize status descriptions

This commit is contained in:
dhanabalan
2025-09-26 10:48:52 +05:30
parent 64237c3da0
commit 92a3b5a448

View File

@@ -85,8 +85,8 @@ class SapFileController extends Controller
if ($allFiles === false) {
return response()->json([
'status' => 'error',
'message' => 'Failed to scan directory',
'debug' => ['path_checked' => $path]
'status_description' => 'Failed to scan directory',
// 'debug' => ['path_checked' => $path]
], 500);
}
@@ -98,10 +98,7 @@ class SapFileController extends Controller
if (empty($files)) {
return response()->json([
'status' => 'error',
'message' => 'No text files found',
'debug' => [
'scanned_files' => $allFiles
]
'status_description' => 'No text files found',
], 404);
}