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

Throw ArgumentErrors when assertions fail #216

Open
hayribakici opened this issue May 12, 2024 · 2 comments
Open

Throw ArgumentErrors when assertions fail #216

hayribakici opened this issue May 12, 2024 · 2 comments

Comments

@hayribakici
Copy link
Collaborator

hayribakici commented May 12, 2024

As mentioned in #215, the assert statements take only place in debug mode. Which means, when this library is compiled or run in production, the asserts are simply ignored.

So in order to provide library users a better handling of the spotify API constraints (e.g. number of tracks in a json) when this library is compiled (or in production mode) and without making unnecessary requests, all methods, that have assert statements, should be replaced with ArgumentErrors or similar.

Thanks to @artyuum for pointing this out.

@hayribakici
Copy link
Collaborator Author

@artyuum this looks like a good first issue. Would you like to implememt it?

@artyuum
Copy link

artyuum commented May 13, 2024

Sure, I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants