anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
68.46k stars 22.47k forks source link

Odd error message when an URL parameter is passed multiple times #3055

Open sigma67 opened 1 year ago

sigma67 commented 1 year ago

Describe the bug

When creating my own deployment, by mistake I passed an URL parameter twice. This can happen easily due to the number of configuration parameters.

In this example, I passed hide twice to top-langs.

I was greeted with the error message str.split is not a function.

Expected behavior

github-readme-stats should perform basic validation and provide a decent error message. This would also prevent unnecessary issues created on GitHub.

Screenshots / Live demo link

No response

Additional context

Thanks for creating this great project!

rickstaa commented 1 year ago

@sigma67, thanks for the bug report. This is related to https://github.com/anuraghazra/github-readme-stats/issues/2737. @qwerty541 should we handle this behavoir internally?

qwerty541 commented 1 year ago

@sigma67, thanks for the bug report. This is related to #2737. @qwerty541 should we handle this behavoir internally?

@rickstaa We should not resolve type conflicts of query parameters internally, but i agree with @sigma67 that we should show adequate error message to user. I'll try to make a pull request soon to fix this.

airwakz commented 11 months ago

@qwerty541 can i try to solve this issue

qwerty541 commented 11 months ago

@qwerty541 can i try to solve this issue

@airwakz Thanks for your interest, but recently i have opened a pull request which will solve this https://github.com/anuraghazra/github-readme-stats/pull/3393