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] Requester recursively throws exception when URL is not valid. #75

Open
Raft08 opened this issue Dec 27, 2023 · 1 comment
Open

Comments

@Raft08
Copy link

Raft08 commented Dec 27, 2023

Hey,
When provided an incorrect url (or Url missing http:// or https://) the requester will recursively throw an IllegalArgumentException until the program crashes or is stopped.

image

I'm working on a fix in a PR.

Here is how to reproduce the bug:

PteroClient client = PteroBuilder.createClient("example.com", "<secret-token>");

Account account = client.retrieveAccount()
                    .execute();
@Raft08
Copy link
Author

Raft08 commented Dec 27, 2023

The issues is that the RateLimiter request queue iterator doesn't remove the element when it fails.

https://github.com/mattmalec/Pterodactyl4J/blob/develop/src/main/java/com/mattmalec/pterodactyl4j/requests/RateLimiter.java see catch block at line 156

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

1 participant