Skip to content

Commit d3fbe3d

Browse files
authored
Merge pull request #231 from GleapSDK/fix/reject-with-error
fix: identify and updateContact reject with an Error; version 19.9.1
2 parents 364ae64 + 9c0cb49 commit d3fbe3d

18 files changed

Lines changed: 120 additions & 36 deletions

‎CHANGELOG.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

3-
## Unreleased
3+
## 19.9.1
4+
Changed: when `Gleap.identify` or `Gleap.updateContact` fails, the promise it returns rejects with an `Error`, for example `Gleap updateContact failed: network error`, `Gleap identify failed: HTTP 500` or `Gleap identify failed: refused (token_invalid)`. Until this version it rejected with `undefined` or the string `'Session not ready yet.'`, which error trackers such as Bugsnag and Sentry report as a non-error unhandled rejection with no message. A logout while one of these requests was still on its way now resolves instead of rejecting. If your app does not want failed requests (for example a user who is offline) in its error tracker, catch them with `Promise.resolve(Gleap.identify(...)).catch(() => {})`. Wrap the call in `Promise.resolve`, because these calls return nothing when there is nothing to send. `Gleap.setLanguage` catches its own contact update.
5+
Changed: a product tour that is not live on the current page no longer writes to `console.error`.
46
Fixed: `index.d.ts` declared `Gleap.setStyles` with one object, but the SDK takes positional arguments: `setStyles(primaryColor, headerColor, buttonColor, backgroundColor?, borderRadius?, buttonX?, buttonY?, buttonStyle?, headerColor2?, headerColor3?)`. A call in the declared object form threw an error on the page and injected no styles. TypeScript projects that call `setStyles` with an object now get a compile error pointing at that call, which never worked; pass the values as arguments instead. No runtime change.
57

68
## 19.9.0

‎build/browser/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎build/browser/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎build/cjs/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎build/cjs/index.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎build/esm/index.mjs‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎build/esm/index.mjs.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "JavaScript and TypeScript SDK for Gleap, an Intercom alternative with AI customer support, live chat, in-app bug reporting and customer feedback.",
33
"name": "gleap",
4-
"version": "19.9.0",
4+
"version": "19.9.1",
55
"main": "build/cjs/index.js",
66
"module": "build/esm/index.mjs",
77
"exports": {

‎published/19.9.1/index.js‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)