UNPKG

react-native-gigya-sdk

Version:
23 lines (20 loc) 529 B
import formatError from './formatError'; export default function (sdkCall, options) { return new Promise(async (resolve, reject) => { try { let response = null; try { response = await sdkCall; } catch (e) { return reject(formatError(e)); } if (!(options !== null && options !== void 0 && options.noParsing)) { response = JSON.parse(response); } resolve(response); } catch (e) { reject(e); } }); } //# sourceMappingURL=handleSdkCall.js.map