Development talk:Web services: Difference between revisions
From MoodleDocs
mNo edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
Should the API have some sort of "last_error" function giving back more details such as "non existing course, non existing user, duplicate entry ...) | Should the API have some sort of "last_error" function giving back more details such as "non existing course, non existing user, duplicate entry ...) | ||
Shall we consider that affecting a role that already exist or removing role that do not exist as an error (output=false) or not (output=true) | Shall we consider that affecting a role that already exist or removing role that do not exist as an error (output=false) or not (output=true) | ||
:yep, agree, I'd result always one well defined $result object, with his status, error code and error msg (and perhaps, the whole original WS request encapsulated for easier debugging). | |||
:[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 19:55, 21 December 2007 (CST) |
Revision as of 01:55, 22 December 2007
general remarks about OUTPUT of operations:
Is true of false informative enough ? Should the API have some sort of "last_error" function giving back more details such as "non existing course, non existing user, duplicate entry ...) Shall we consider that affecting a role that already exist or removing role that do not exist as an error (output=false) or not (output=true)
- yep, agree, I'd result always one well defined $result object, with his status, error code and error msg (and perhaps, the whole original WS request encapsulated for easier debugging).
- Eloy Lafuente (stronk7) 19:55, 21 December 2007 (CST)