With having localization in mind, kind of annoying to only get a message returned for say user.login ("The user has already logged in.")
much nicer for error control to just have to do if ($result['code'] == USER_LOGIN_ERROR) .
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | services_errnum.patch | 828 bytes | scottgifford |
Comments
Comment #1
sitron2 commented+1
thanks!
Comment #2
marcingy commentedHappy to do this but please provide a patch
Comment #3
scottgifford commentedHere is a patch against 5.x-0.92 which has the XML-RPC error handler look in the message for a pound sign followed by numbers, and if it finds it reports that as an error code. A bit of a hack, but it avoids changing the API that other RPC servers use, and doesn't conflict with RPC types that don't support a numeric error code (like JSON IIRC).
Comment #4
marcingy commentedThat is fine keeping it specific to the xml-rpc server. Looks good from a quick eyeball - will test over the weekend and commit if no issues occur.
Comment #5
marcingy commentedCommited against d5 and d6
Comment #6
Anonymous (not verified) commentedlol wow. i didnt know this got committed. thanks guys :)
Comment #7
marcingy commented