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

[BUG]: http error is unhandled and empty content is returned #2572

Open
nam-truong-le opened this issue Apr 17, 2024 · 0 comments
Open

[BUG]: http error is unhandled and empty content is returned #2572

nam-truong-le opened this issue Apr 17, 2024 · 0 comments
Labels

Comments

@nam-truong-le
Copy link

At this location https://github.com/glideapps/quicktype/blob/master/packages/quicktype-core/src/input/io/NodeIO.ts#L43 we should check the HTTP response code.

Issue Type

Reading file from URL

Context (Environment, Version, Language)

N/A

Input Format:
Output Language:

N/A

CLI, npm, or app.quicktype.io:
Version:

Description

For example, when I provide a github token like this in the cli --http-header "Authorization: token $GITHUB_TOKEN" and the token is expired, instead of throwing an error, quicktype generate empty content.

Input Data

Expected Behaviour / Output

The process should fail

Current Behaviour / Output

quicktype generates empty content.

Steps to Reproduce

Use an expired github token to access github raw URL.

Possible Solution

Check HTTP response code.

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

No branches or pull requests

1 participant