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

sync feature can provide misleading error messages #640

Closed
1 task done
jtiee opened this issue May 31, 2023 · 3 comments
Closed
1 task done

sync feature can provide misleading error messages #640

jtiee opened this issue May 31, 2023 · 3 comments

Comments

@jtiee
Copy link

jtiee commented May 31, 2023

Check for existing issues

  • Completed

Environment

OS: macOS Ventura 13.3.1 (a), on a Macbook M1 Pro.
Vale: 2.27.0 via direct download.

Describe the bug / provide steps to reproduce it

If I configure the Packages field in my vale.ini with a URL, and the URL happens to be incorrect or inaccessible, Vale reports:

opening zip archive for reading: creating reader: zip: not a valid zip file

This is misleading. I spent a long time trying to diagnose that error and potential problems in the ZIP file when the problem was a lack of authorization to access the ZIP archive.

When a Package URL involves a non-existent domain, Vale does report:

Get "https://example.example/style.zip": dial tcp: lookup example.example: no such host

That's useful! 4xx or 5xx HTTP errors for package downloads should be reported as such instead of blaming the ZIP file.

@jdkato
Copy link
Member

jdkato commented Aug 15, 2023

You will now see

Could not fetch '<url>' (status code '404').

or similar.

@jtiee
Copy link
Author

jtiee commented Aug 15, 2023

Thanks!

@protothomasdev
Copy link

Hi, I still get the error when I try to sync a package from a private repo, even though I have access to it.

The repo is hosted on organization Gitlab account and our team members access it with SSO. I tried to curl the file and got back a redirect to a login page. My guess is, that http.Get automatically follows the redirect and gets a 200 for the login page, which is an HTML page but not a zip as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants