_wrapAsync in javascript SDK

Hi,

There seems to be a bug in the javascript SDK. There is


    UserService.prototype = {
        _wrapAsync: function(async, stayLoggedIn) {
            var me   = this, success = function(data) {
                currentUser = me._parseResponse(tryParseJSON(data), stayLoggedIn);
                async.success(me._getUserFromResponse(currentUser));
            }, error = function(data) {
                async.fault(data);
            };


            return new Async(success, error);
        },

which is used throughout the UserService module. It however contains behaviour to handle a login request (or a request returning a user object anyway).

In the get getUserRoles method for example, _wrapAsync should not be used. Not sure about other places, but I had to disable it at that place because I requested the user roles after login, and the wrapper code messed up the stayLoggedIn functionality.

Kind regards,
Jeroen

Hello, Jeroen!
Thank you for reporting it, it looks that you’re right. I’ve created an internal ticket for this topic and we shall work on it. Ticket ID is BKNDLSS-13006.
Best regards,
Alex

was this fixed?

Yes