@fyno/node 1.2.0-prerelease → 1.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fyno/node",
3
- "version": "1.2.0-prerelease",
3
+ "version": "1.2.0",
4
4
  "description": "This is the official Node.js module for sending notifications through Fyno.io.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,8 +21,8 @@ class Event {
21
21
  retryCondition: (error) => {
22
22
  // if retry condition is not specified, by default idempotent requests are retried
23
23
  return (
24
- error.response.status !== 202 &&
25
- error.response.status !== 401
24
+ error?.response?.status !== 202 &&
25
+ error?.response?.status !== 401
26
26
  );
27
27
  },
28
28
  });
@@ -12,7 +12,7 @@ class Profile {
12
12
  async getProfile() {
13
13
  try {
14
14
  const url = new URL(`${this.endpoint}${this.distinct_id}`).href;
15
- const res = this.request(url, this.payload, "GET");
15
+ const res = this.request(url, null, "GET");
16
16
  return res;
17
17
  } catch (error) {
18
18
  if (error.response.status === 400) {