https://bugzilla.wikimedia.org/show_bug.cgi?id=38716

--- Comment #12 from Jon <[email protected]> 2012-08-23 17:27:11 UTC ---
This is not really about REST and discussion of REST is confusing the real
issue I'm getting at here.

I am asking that we make warnings and errors more obvious. I keep running into
various bugs or hearing about bugs with the api where I have been given
warnings/errors and these haven't been surfaced well. Sometimes this is due to
inconsistencies in the response (for example recently I discovered an error
returned in the form { "1": { "error": {} } } rather than  { "error": {} } 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.

On the Wiki Loves Monuments app we keep running into issues with things such as
logging in, failed uploads - and since the api returns no error codes it is
near impossible to consult apache logs to work out what is happening.

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.

I'd much rather the api was stricter or could be signalled to be stricter (e.g.
I add a query string parameter called strict). To me 400 and expecting the
client to requery with a lower limit IS helpful as it is highlighting the fact
that my code is making unreasonable queries. I would expect to rethink my code
so that it avoids the 400 altogether and takes into account this problem. a 400
is much more noticeable to me then a 200 which by definition should mean "The
request has succeeded." [1]

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

[1]  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1

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

Reply via email to