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

Ensure the body of failed requests get printed #110

Open
bcomnes opened this issue Nov 19, 2022 · 8 comments
Open

Ensure the body of failed requests get printed #110

bcomnes opened this issue Nov 19, 2022 · 8 comments

Comments

@bcomnes
Copy link
Owner

bcomnes commented Nov 19, 2022

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.

@bcomnes bcomnes added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 19, 2022
@adrianmarinwork
Copy link

Can I take care of this issue?

@bcomnes
Copy link
Owner Author

bcomnes commented Nov 19, 2022

Yeah if you feel up to it! The bulk of the work would probably be in https://github.com/bcomnes/async-neocities.

@bcomnes
Copy link
Owner Author

bcomnes commented Nov 19, 2022

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: #109

@adrianmarinwork
Copy link

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?

@bcomnes
Copy link
Owner Author

bcomnes commented Nov 19, 2022

Yeah

@adrianmarinwork
Copy link

I'm sorry, but do you know an easy way or how to run the neocities-api project locally to test the deploy endpoint?

@bcomnes
Copy link
Owner Author

bcomnes commented Nov 19, 2022

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.

@adrianmarinwork
Copy link

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

@bcomnes bcomnes removed help wanted Extra attention is needed good first issue Good for newcomers labels May 1, 2024
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