https://bugzilla.wikimedia.org/show_bug.cgi?id=38716
--- Comment #13 from Brad Jorsch <[email protected]> 2012-08-23 18:12:04 UTC --- (In reply to comment #12) > I am asking that we make warnings and errors more obvious. They're plenty obvious, IMO. An error is returned as a node 'error' within the root node, and warnings are returned inside a node 'warnings' within the root node. If you see something reporting API errors or warnings differently, report it as a bug. > (for example recently I discovered an error returned in the form > { "1": { "error": {} } } rather than { "error": {} } That would appear to be a bug. Details? > and sometimes I just don't ever expect to get an error except in extreme edge > cases which I'd rather avoid through good programming techniques then surface > them to the user. That's not a problem with the API then, is it? > and since the api returns no error codes Repeating erroneous statements doesn't make them true. Please stop. > I ran into a bug the other day where I tried to upload a file and got a 200 OK > with the error message 'filename too long' - if we'd been able to monitor logs > for 400s I am sure this bug would have got surfaced much earlier and dealt > with. I hate to think what other bugs exist in the app due to this lack of > visibility. You're probably using some sort of framework (either home-grown or third-party), and that framework probably has a low-level function that sends the query to the server and parses the response. Right there, as soon as the response is parsed, log any errors or warnings or take whatever other action you need. Simple. > then a 200 which by definition should mean "The request has succeeded." The HTTP request did succeed. > Currently the situation is like going to an ATM machine and asking for 400USD > and only getting 300USD back without any explanation (in fact the ATM says > "thank you!" and pretends everything went as expected). Bad analogy: removing money from an ATM has consequences that making an API query doesn't. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
