Closed ontehfritz closed 10 years ago
Hi! I'm alotau on GitHub too! Just a clarification on my clarification above: the URL should have said http://api.mtgdb.info/cards/?fields=id,name,cardsetid,
The whole point, which I think you captured well, is that a trailing comma on a field filter query breaks things.
To add to this, any bad field will throw the Server 500 error after some delay.
Hey! Yes, I mentioned in JabbR that I will put a check in. If the field is invalid, it will throw an exception stating which field is invalid. This will happen before fetching the records, so there will be no wait time for the exception.
As per "alotau" on jabbR:
A trailing comma on a call to http://api.mtgdb.info/cards/[int,int,int,int,...] is not a problem, but... 4:54:32 PM A trailing comma on http://api.mtgdb.info/cards/?fields=id,name,cardsetid causes a server 500 error. 4:55:06 PM that previous url should have said http://api.mtgdb.info/cards/?fields=id,name,card, 7:37:59 PM perhaps there should be some sort of query parsing and some result returned that indicates a bad query? might save server load and might be helpful to clients