-
Notifications
You must be signed in to change notification settings - Fork 60
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
Errors loading config larger than 1MB #227
Comments
@bluekeyes
|
Hey @SoulPancake, thanks for the suggestion. I think we can simplify this further by making one request with the Also, it looks like the |
I think this has been broken since we introduced the
appconfig
package, but it's also possible that GitHub's API changed. TheGetContents
method returns content if the file is less than 1MB and an emptycontent
field in the JSON for content between 1MB and 100MB. The endpoint returns an error for content over 100MB.We handle the case where the content is larger than 100MB, but do not handle the case where the content is larger than 1MB. Instead, we return an error when we try to decode content with the
none
encoding.When the content field is empty, I think there are two options:
raw
media typeDownloadContents
method, like we do when the file is larger than 100MBThe reason to not use
DownloadContents
every time is that it makes two API calls: one to list the directory containing the file, and then one to download the file. Since most apps perform configuration lookups all the time, minimizing requests here is a good idea.The text was updated successfully, but these errors were encountered: