Uh oh!
There was an error while loading. Please reload this page.
Handle encoding value of "none" - #2924
Conversation
WillAbides
commented
Sep 11, 2023
If I understand the docs correctly, Content should always be nil when encoding is "none". I think it would be better to continue returning an error on "none", but it could be a better error that explains that this is because the file size is over 1MB and suggests using DownloadContents instead. |
GusPrice
commented
Sep 11, 2023
Ah! It seems in fact I have misunderstood! Definitely would be nice to have a better error though. I'll update my PR accordingly. |
GusPrice
commented
Sep 11, 2023
Updated to give a nicer error message in that case! |
WillAbides
left a comment
There was a problem hiding this comment.
LGTM. Just a small nit about the test case, but you don't necessarily need to take my suggestion there.
To set expectations, the primary maintainer is out until 9/18, so this PR is not likely to be merged before then.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #2924 +/- ##
=======================================
Coverage 98.17% 98.17% =======================================
Files 143 143 Lines 12609 12611 +2 =======================================
+ Hits 12379 12381 +2
Misses 156 156 Partials 74 74
|
Uh oh!
There was an error while loading. Please reload this page.
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @GusPrice and @WillAbides !
LGTM.
Merging.
When a file is over 1 MB in a repository, GitHub responds with "none" as the encoding value. Handle this accordingly.