Return empty array instead of 404
This commit is contained in:
parent
87306f1dce
commit
32076a8936
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ export async function list(operation: "file" | "folder", path: string[]) {
|
||||||
|
|
||||||
if (!res || !res.ok) {
|
if (!res || !res.ok) {
|
||||||
if (res && res.status === HttpStatus.NOT_FOUND) {
|
if (res && res.status === HttpStatus.NOT_FOUND) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบแฟ้ม/ไฟล์ในระบบ");
|
return [];
|
||||||
}
|
}
|
||||||
return Boolean(console.error(res ? await res.json() : res));
|
return Boolean(console.error(res ? await res.json() : res));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue