Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-web
ensembl-client
Commits
99655e4f
Unverified
Commit
99655e4f
authored
Apr 14, 2022
by
Andrey Azov
Committed by
GitHub
Apr 14, 2022
Browse files
Fail downloading all sequences by InstantDownload if any one fails (#728)
parent
5999a8f4
Pipeline
#266357
passed with stages
in 4 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
src/shared/components/instant-download/instant-download-gene/InstantDownloadGene.tsx
...nt-download/instant-download-gene/InstantDownloadGene.tsx
+2
-1
src/shared/components/instant-download/instant-download-transcript/InstantDownloadTranscript.tsx
...instant-download-transcript/InstantDownloadTranscript.tsx
+2
-1
src/shared/workers/sequenceFetcher.worker.ts
src/shared/workers/sequenceFetcher.worker.ts
+7
-1
No files found.
src/shared/components/instant-download/instant-download-gene/InstantDownloadGene.tsx
View file @
99655e4f
...
...
@@ -133,8 +133,9 @@ const InstantDownloadGene = (props: Props) => {
try
{
await
fetchForGene
(
payload
);
props
.
onDownloadSuccess
?.(
payload
);
}
catch
{
}
catch
(
error
)
{
props
.
onDownloadFailure
?.(
payload
);
throw
error
;
}
finally
{
resetCheckboxes
();
}
...
...
src/shared/components/instant-download/instant-download-transcript/InstantDownloadTranscript.tsx
View file @
99655e4f
...
...
@@ -149,8 +149,9 @@ const InstantDownloadTranscript = (props: Props) => {
try
{
await
fetchForTranscript
(
payload
);
props
.
onDownloadSuccess
?.(
payload
);
}
catch
{
}
catch
(
error
)
{
props
.
onDownloadFailure
?.(
payload
);
throw
error
;
}
finally
{
resetCheckboxes
();
}
...
...
src/shared/workers/sequenceFetcher.worker.ts
View file @
99655e4f
...
...
@@ -30,7 +30,13 @@ export type SequenceFetcherParams = Array<SingleSequenceFetchParams>;
const
downloadSequences
=
async
(
params
:
SequenceFetcherParams
)
=>
{
const
sequencePromises
=
params
.
map
(({
label
,
url
,
reverseComplement
})
=>
{
return
fetch
(
url
)
.
then
((
response
)
=>
response
.
text
())
.
then
((
response
)
=>
{
if
(
response
.
ok
)
{
return
response
.
text
();
}
else
{
throw
new
Error
();
}
})
.
then
((
sequence
)
=>
{
if
(
reverseComplement
)
{
sequence
=
getReverseComplement
(
sequence
);
...
...
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