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

Client() constructor results in 400 error if no locale is specified #47

Open
aguish opened this issue Oct 8, 2023 · 1 comment
Open
Assignees
Labels
type: bug Something isn't working type: internal Internal issue

Comments

@aguish
Copy link

aguish commented Oct 8, 2023

Issue: When using the Client() constructor without specifying a locale, the underlying request to the Riot API results in a 400 error. It seems the Riot API expects a locale parameter, and not having one causes this error.

Steps to Reproduce:

  1. Initialize the client without specifying a locale:
client = valorant.Client(YOUR_API_KEY)
  1. Observe the 400 error.

Expected Behavior: The library should either provide a default locale (if applicable) or raise a more descriptive error guiding the user to provide the necessary locale parameter.

Temporary Workaround: Specifying locale=None when initializing the client appears to prevent this error:

client = valorant.Client(YOUR_API_KEY, locale=None)

Code_iRegNhVT3w

@frissyn frissyn self-assigned this Oct 8, 2023
@frissyn frissyn added type: bug Something isn't working type: internal Internal issue labels Oct 8, 2023
@frissyn
Copy link
Owner

frissyn commented Oct 8, 2023

Thanks for opening an issue. This might be a more recent change to their API endpoints because this has never raised any errors before. I'll look into this later tonight and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: internal Internal issue
Projects
None yet
Development

No branches or pull requests

2 participants