Bug in team matches endpoint

Sort:
Tricky_Dicky

https://api.chess.com/pub/club/{ID}/matches

if request sent to this end point with team name with UTF chars then returns null string.

No error code sent back. Would expect either 404 or 410 response.  

Example:

https://api.chess.com/pub/club/principauté-de-monaco/matches

stephen_33

No error code? I'm getting this:-

This api.chess.com page can’t be found

It may have been moved or deleted.

HTTP ERROR 410
Tricky_Dicky

Which browser are you using Stephen?

stephen_33

Google Chrome

Tricky_Dicky

Hmm. Just tried in Chrome myself and got same as you.

Normally use Firefox and it returns a blank screen. I think the Chrome response is from Google not C.C API.

Just tried an experiment in a command window.


Valid team name: OK

curl https://api.chess.com/pub/club/somerset-wyvern/matches  

Return List of team matches


Invalid team name (No extended UTF): Returns error code:

curl https://api.chess.com/pub/club/somerset-wyvern/matches

Returns  {"code":0,"message":"Club \"somerset-wyv\" not found."}


Invalid team name (With extended UTF) Returns null

curl https://api.chess.com/pub/club/principauté-de-monaco/matches

get zip!

 

 

 

stephen_33

Is that to say the c.c server isn't returning an intelligible error code and the browser is generating a default?

Tricky_Dicky

Yes, I think so. Google being too clever and masking an issue from the source.

It's an irritation rather than a show stopper but a call to API shouldn't return null.

stephen_33

Agree.