PDA

View Full Version : API RFE: error injection


cabbey
Oct-14-2007, 07:52 PM
This is a low priority RFE, but it's one I was thinking about as I was coding up some error handlers... It would be nice to be able to cause error injection on the api. A suggested API would look like:

method: smugmug.api.debug.errorinject
args: string SessionID
int numberOfFailures
int failureCode
summary: will cause the next numberOfFailures calls in this session to return failureCode and not even try to be executed.

As I write this, I realize a far more useful api would be:

method: smugmug.api.debug.readonly
args: string SessionID
summary: will cause subsequent API calls on this session to behave as if Smugmug was in read only mode.