@adminforth/completion-adapter-google-gemini 2.0.1 → 2.0.2

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.
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ export default class CompletionAdapterGoogleGemini {
31
31
  }
32
32
  catch (error) {
33
33
  logger.error(`Error during Google Gemini API call: ${error}`);
34
- throw new Error(`Error during Google Gemini API call: ${error}`);
34
+ throw new Error(`Error during Google Gemini API call: ${JSON.parse(error.message).error.message}`);
35
35
  }
36
36
  });
37
37
  const result = yield pRetry(tryToGenerate, {
package/index.ts CHANGED
@@ -46,7 +46,7 @@ export default class CompletionAdapterGoogleGemini
46
46
  };
47
47
  } catch (error) {
48
48
  logger.error(`Error during Google Gemini API call: ${error}`);
49
- throw new Error(`Error during Google Gemini API call: ${error}`);
49
+ throw new Error(`Error during Google Gemini API call: ${JSON.parse(error.message).error.message}`);
50
50
  }
51
51
  }
52
52
  const result = await pRetry(tryToGenerate, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/completion-adapter-google-gemini",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",