@ouroboros/body 1.2.1 → 1.2.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/lib/index.js CHANGED
@@ -145,7 +145,7 @@ class Body {
145
145
  // If we have a no session callback
146
146
  if (_.noSession) {
147
147
  _.noSession();
148
- return Promise.resolve();
148
+ return reject({ code: 0, msg: '401 Not Authorized' });
149
149
  }
150
150
  else {
151
151
  throw new Error(`${METHODS[action]} ${url} return 401 NOT AUTHORIZED`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouroboros/body",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Classes to communicate with Ouroboros Coding Inc. body services",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -26,6 +26,6 @@
26
26
  "devDependencies": {
27
27
  "tslint": "^6.1.3",
28
28
  "tslint-config-prettier": "^1.18.0",
29
- "typescript": "^4.9.5"
29
+ "typescript": "^5.9.2"
30
30
  }
31
31
  }
package/releases.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # @ouroboros/body releases
2
2
 
3
+ ## 1.2.2
4
+ - Fixed issue where `finally` not being called on Promises if 401 Not Authorized is returned.
5
+
3
6
  ## 1.2.1
4
- - Fixed issue where 401 Unauthorized issues weren't properly handled causing thrown errors.
7
+ - Fixed issue where 401 Not Authorized issues weren't properly handled causing thrown errors.
5
8
 
6
9
  ## 1.2.0
7
10
  - Moved generated .js and .d.ts files into lib/ instead of build/, this changes the "main" from "build/index.js" to "lib/index.js".
package/src/index.ts CHANGED
@@ -221,7 +221,7 @@ class Body {
221
221
  // If we have a no session callback
222
222
  if(_.noSession) {
223
223
  _.noSession();
224
- return Promise.resolve();
224
+ return reject({ code: 0, msg: '401 Not Authorized' });
225
225
  } else {
226
226
  throw new Error(
227
227
  `${METHODS[action]} ${url} return 401 NOT AUTHORIZED`