bet-test-sdk 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22031,7 +22031,10 @@ class BetSDK {
22031
22031
  throw new Error('Empty response received from server');
22032
22032
  }
22033
22033
  try {
22034
- // console.log('responseText:', JSON.parse(responseText));
22034
+ const responseJson = JSON.parse(responseText);
22035
+ if (responseJson.code != 0 || !responseJson.data) {
22036
+ throw new Error(`Server error: ${responseJson.msg || 'No error details available'}`);
22037
+ }
22035
22038
  return JSON.parse(responseText);
22036
22039
  }
22037
22040
  catch (e) {