silexlabs / cloud-explorer

*this version is deprecated, see CloudExplorer2* File manager for your users cloud services such as dropbox, google drive and FTP
http://cloud-explorer.org
52 stars 23 forks source link

error callbacks #16

Closed lexoyo closed 11 years ago

lexoyo commented 11 years ago

My error callbacks are never called

I do this

// cloud explorer expects relative path
var relBlob = {
    url : '......my NOT existing dropbox path.....'
}
this.filePicker.read(
relBlob, 
function(data){
    // workaround: cloud explorer issue https://github.com/silexlabs/cloud-explorer/issues/2
    new goog.async.Delay(function () {
        if (cbk) cbk(data);
    }, 10, this).start();
},
function(FPError){
    console.error(FPError);
    if (opt_errCbk){
        console.error(FPError);
        opt_errCbk(FPError);
    }
});
zabojad commented 11 years ago

Fixed, just note that I give in params to the error callback an object of this form:

{"success":false,"code":401,"message":"User not logged in yet. You need to call the 'login' service first."}

If it's not ok, please tell me.