Without this fix the callers of this function could not read the
failure code and result, because we returned undefined. Because
we are using a filter function, we need to explicitly return the
promise to pass it forward.
Change-Id: I71984ac827618459f723b0b9f47d4dc29e2a2f70
tokenCache[tokenType] = params.token = undefined;
return api.post( params );
}
tokenCache[tokenType] = params.token = undefined;
return api.post( params );
}
+ // Pass the promise forward, so the caller gets error codes
+ return this;