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

Improve error handling #107

Open
Privat33r-dev opened this issue Aug 24, 2024 · 0 comments
Open

Improve error handling #107

Privat33r-dev opened this issue Aug 24, 2024 · 0 comments
Labels
enhancement New feature or request Priority Issue Issue set to fast track

Comments

@Privat33r-dev
Copy link
Collaborator

Privat33r-dev commented Aug 24, 2024

When url is set as a parameter that hasn't graphql, we get the following error:

2024-08-24 01:42:11     WARNING | Error posting to https://somewebsite/: Expecting value: line 1 column 1 (char 0)

Which is implicit. I think that proper error handling should be in place and we might tell to the user that URL might be incorrect or there is another issue (based on possibilities). It will make program "smarter".

Additionally, in case if URI without path is set, we might suggest to use different tool to discover GraphQL endpoints.

For now,
If you are seeing json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0), then, please, make sure that it's the issue on Clairvoyance side and not: auth error, rate limiting, server WAF, server header/IP requirements or other server-related issue.


Draft of a troubleshooting guide

List of potential reasons of "Retrieved non-JSON response from ..."

  • Invalid URI: check that endpoint is set correctly (TODO: if no GraphQL detected on endpoint, stop exec with appropriate message)
  • Auth Error: make sure that cookies and authentication headers are set the same as in browser or other place that is able to connect with GraphQL endpoint; sometimes IP might play a role in it as well
  • Rate Limiting: if Clairvoyance was executing fine before the error, it might be due to rate limiting. Lower amount of threads or try to run the program in a slow mode
  • WAF: server doesn't allow requests due to bad user-agent or other reason. See auth error for details on fix.
  • Ban: your IP/fingerprint might've been banned by some sensitive IPS, you can try to circumvent block by changing your IP and other parameters
  • Server-related issue: server might be temporary unavailable, check the endpoint manually using browser or other previously used tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority Issue Issue set to fast track
Projects
None yet
Development

No branches or pull requests

1 participant