@linktr.ee/create-link-app 1.7.6 → 1.7.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.
@@ -5,15 +5,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const axios_1 = __importDefault(require("axios"));
7
7
  async function checkLinkAppExists(url, linkAppId, accessToken) {
8
- const linkAppCreateUrl = `${url}/${linkAppId}`;
9
- const response = await axios_1.default.get(linkAppCreateUrl, {
10
- headers: {
11
- Authorization: `Bearer ${accessToken}`,
12
- },
13
- });
14
- if (response.status !== 200) {
8
+ try {
9
+ const linkAppCreateUrl = `${url}/${linkAppId}`;
10
+ const response = await axios_1.default.get(linkAppCreateUrl, {
11
+ headers: {
12
+ Authorization: `Bearer ${accessToken}`,
13
+ },
14
+ });
15
+ if (response.status !== 200) {
16
+ return false;
17
+ }
18
+ return response.data?.linkTypeId === linkAppId;
19
+ }
20
+ catch (err) {
15
21
  return false;
16
22
  }
17
- return response.data?.linkTypeId === linkAppId;
18
23
  }
19
24
  exports.default = checkLinkAppExists;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.6",
2
+ "version": "1.7.8",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",