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

Automation is broken #345

Open
bjohansebas opened this issue Nov 23, 2024 · 2 comments
Open

Automation is broken #345

bjohansebas opened this issue Nov 23, 2024 · 2 comments
Assignees

Comments

@bjohansebas
Copy link
Member

bjohansebas commented Nov 23, 2024

The automation is broken because it cannot correctly retrieve https://www.iana.org/assignments/media-types/image.csv, even though the endpoint is correct.

If that resource is removed for generation, the following PR bjohansebas#1 would be obtained, although ideally, it shouldn’t be removed.

I’ve added console.log to debug the issue, please check the results of the following workflows:

https://github.com/bjohansebas/mime-db/actions/runs/11982093952/job/33409524328 (work)
https://github.com/bjohansebas/mime-db/actions/runs/11982462369/job/33410514027 (not work)

@bjohansebas
Copy link
Member Author

bjohansebas commented Nov 26, 2024

@wesleytodd I think this is going to be a problem with got, and we can't update it because Got is now ESM-only. Maybe I can make this work again with Undici.

Edit: I think it's no longer a got issue, I'll keep looking.
Edit: the issue happens when it reaches image/x-emf, I'll keep looking.
image
Edit: This is an error from IANA, perhaps the best option would be to contact them to see if they can add it back.
Edit: It is not an IANA error, those pages never existed, so it is an error on got for not being able to handle the request properly.

@jonchurch
Copy link
Member

jonchurch commented Jan 4, 2025

When the update script was refactored to use got in 92715b3 it didn't factor in that got throws on non success http status codes

So 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 fetching

let res = await got(url, { throwHttpErrors: false })

But 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

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

No branches or pull requests

2 participants