dont throw on 404s when fetching templates from iana #355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
workaround for #345
When the update script was refactored to use
got
in 92715b3 it didn't factor in thatgot
throws on non success http status codesSo the built in 404 handling in the
addTemplateData
function will never run and we exit early on the unhandled promise rejection.A workaround is to set
throwHttpErrors: false
when fetchingBut the script needs a look over, since the assumptions about the http client's behavior are not valid anymore.
Why Now?
there were deprecated unofficial (extension) mime types which are 404ing now,
image/x-emf, image/x-wmf
I don't see when they went standard as
image/emf, image/wmf
, or when the extension versions started 404ing