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.
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.