diff --git a/errors/errors.go b/errors/errors.go index 592cabe3..c79e3783 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -16,4 +16,5 @@ var ( ErrInvalidAuthMethod = errors.New("invalid auth method") ErrPermissionDenied = errors.New("permission denied") ErrInvalidRequestParams = errors.New("invalid request params") + ErrSourceIsParent = errors.New("source is parent") ) diff --git a/frontend/src/api/files.js b/frontend/src/api/files.js index 5942e71a..b3177c9d 100644 --- a/frontend/src/api/files.js +++ b/frontend/src/api/files.js @@ -43,7 +43,7 @@ async function resourceAction (url, method, content) { const res = await fetchURL(`/api/resources${url}`, opts) if (res.status !== 200) { - throw new Error(res.responseText) + throw new Error(await res.text()) } else { return res } diff --git a/frontend/src/components/files/Listing.vue b/frontend/src/components/files/Listing.vue index 6a4eefdb..96e93670 100644 --- a/frontend/src/components/files/Listing.vue +++ b/frontend/src/components/files/Listing.vue @@ -8,9 +8,7 @@