Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gu imageworks extension
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
joetsuihk
gu imageworks extension
Commits
9539e807
Commit
9539e807
authored
Jan 18, 2022
by
edwin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add error message
parent
ee93443f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
fetch.js
fetch/fetch.js
+17
-5
lightbox.css
fetch/lightbox.css
+1
-1
No files found.
fetch/fetch.js
View file @
9539e807
...
...
@@ -35,7 +35,7 @@
});
})
.
catch
(
error
=>
console
.
log
(
'error'
,
error
));
.
catch
(
error
=>
console
.
error
(
"Unable to fetch lightbox.html"
+
error
));
}
}
...
...
@@ -237,7 +237,10 @@
let
response
=
await
fetch
(
`
${
baseurl
}
api/asset/more?scrollId=
${
scrollId
}
`
,
config
)
.
then
(
response
=>
response
.
json
())
.
catch
(
error
=>
addDebugMessage
(
error
));
.
catch
(
error
=>
{
addDebugMessage
(
"Fetch error on fetchSKU - Scroll : "
+
error
);
throw
new
Error
(
"Fetch error on fetchSKU - Scroll : "
+
error
);
});
assetlist
=
assetlist
.
concat
(
response
.
assets
);
...
...
@@ -247,7 +250,10 @@
return
assetlist
;
})
.
catch
(
error
=>
console
.
error
(
error
));
.
catch
(
error
=>
{
addDebugMessage
(
"Fetch error on fetchSKU : "
+
error
);
throw
new
Error
(
"Fetch error on fetchSKU : "
+
error
);
});
}
// filter asset by Date
...
...
@@ -321,7 +327,10 @@
"body"
:
json
})
.
then
(
response
=>
response
.
json
())
.
catch
(
error
=>
console
.
error
(
error
));
.
catch
(
error
=>
{
addDebugMessage
(
"Fetch error on DownloadList - POST request: "
+
error
);
throw
new
Error
(
"Fetch error on DownloadList - POST request: "
+
error
);
});
// send GET request for downloading the zip file
fetch
(
`/api/asset/download/
${
response
.
token
}
`
,
getConfig
(
getHeader
()))
...
...
@@ -339,7 +348,10 @@
addDebugMessage
(
`download
${
name
}
.zip completed`
);
})
.
catch
(
error
=>
console
.
error
(
error
));
.
catch
(
error
=>
{
addDebugMessage
(
"Fetch error on DownloadList - GET request: "
+
error
);
throw
new
Error
(
"Fetch error on DownloadList - GET request: "
+
error
);
});
}
else
if
(
assetlist
.
length
===
1
){
...
...
fetch/lightbox.css
View file @
9539e807
...
...
@@ -98,7 +98,7 @@
#fetch-lightbox
.debug-box
{
width
:
100%
;
height
:
100%
;
padding-top
:
1
0
px
;
padding-top
:
1
2
px
;
}
#fetch-lightbox
.asset-item
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment