deploy-to-neocities
deploy-to-neocities copied to clipboard
Ensure the body of failed requests get printed
Neocities rejects all sorts of files. We need to do a better job of printing which file its rejecting. Ensure we get the body of bad http request errors from the API and print it, along with the list of files that are being uploaded.
Can I take care of this issue?
Yeah if you feel up to it! The bulk of the work would probably be in https://github.com/bcomnes/async-neocities.
Basically, the goal is to see what the API is saying when it rejects file which I get a lot of reports when people try to upload filetypes that are not allowed: https://github.com/bcomnes/deploy-to-neocities/issues/109
So probably the work has to be done in the repository that you have linked in the comment above to change what the API is returning right?
Yeah
I'm sorry, but do you know an easy way or how to run the neocities-api project locally to test the deploy endpoint?
In the async-neocities repo, if you set a config.json in the root of the repo and add an API key like this:
{
"token": "1234qwer"
}
But using a real token, it will make API requests against whatever website the Key is associated with. You probably need a paid or secondary account to do that though.
I've trying to run the test.js
file with a token I have created in the Riot Developer Portal to test but I'm always getting forbidden error, when getting info about the site for example.