Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refetch on CORS error with cache:'reload' #74

Merged
merged 7 commits into from
Mar 10, 2021
Merged

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Mar 4, 2021

Possible fix to #72

Example file that produces a CORS error

http://giab.s3.amazonaws.com/data/AshkenazimTrio/HG003_NA24149_father/NIST_Stanford_Illumina_6kb_matepair/bams/HG003.mate_pair.bam

It is not fixed by refetching in this case (if we made an automatic cors-proxy that might be an option) but it does console.warn to indicate that it is refetching

@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #74 (4251213) into master (2492e27) will decrease coverage by 3.04%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   86.95%   83.90%   -3.05%     
==========================================
  Files           4        4              
  Lines         161      174      +13     
  Branches       54       57       +3     
==========================================
+ Hits          140      146       +6     
- Misses         21       28       +7     
Impacted Files Coverage Δ
src/remoteFile.ts 82.22% <68.75%> (-6.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2492e27...4251213. Read the comment docs.

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Mar 4, 2021

Note also the usage of manually testing against the error message, this is really the only cue that is available to do a refetch (there is no status 0 or anything on the error object)

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Mar 4, 2021

@rbuels let me know what you think

I am unable to reliably reproduce the issue that is related to this, so not really able to test realistically

@cmdcolin cmdcolin requested a review from rbuels March 4, 2021 00:37
@rbuels rbuels merged commit 55f7893 into master Mar 10, 2021
@rbuels rbuels deleted the refetch_on_cors_error branch March 10, 2021 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants