github-readme-stats icon indicating copy to clipboard operation
github-readme-stats copied to clipboard

Odd error message when an URL parameter is passed multiple times

Open sigma67 opened this issue 2 years ago • 4 comments

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!

sigma67 avatar Aug 08 '23 17:08 sigma67

@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?

rickstaa avatar Aug 13 '23 11:08 rickstaa

@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.

qwerty541 avatar Aug 13 '23 21:08 qwerty541

@qwerty541 can i try to solve this issue

airwakz avatar Oct 15 '23 08:10 airwakz

@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

qwerty541 avatar Oct 19 '23 17:10 qwerty541