@naturalcycles/backend-lib 4.17.8 → 4.17.9

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.
@@ -90,7 +90,7 @@ async function deployHealthCheck(url, opt = {}) {
90
90
  retry: {
91
91
  count: 0,
92
92
  },
93
- followRedirects: false,
93
+ redirect: 'error',
94
94
  });
95
95
  if (err) {
96
96
  console.log(err);
@@ -48,7 +48,7 @@ function respondWithError(req, res, err) {
48
48
  }
49
49
  if (res.headersSent)
50
50
  return;
51
- const httpError = (0, js_lib_1._errorToErrorObject)(originalError);
51
+ const httpError = (0, js_lib_1._errorLikeToErrorObject)(originalError);
52
52
  if (!includeErrorStack)
53
53
  delete httpError.stack;
54
54
  httpError.data.errorId = errorId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.17.8",
3
+ "version": "4.17.9",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "serve": "APP_ENV=dev nodemon",
@@ -132,7 +132,7 @@ export async function deployHealthCheck(
132
132
  retry: {
133
133
  count: 0,
134
134
  },
135
- followRedirects: false,
135
+ redirect: 'error',
136
136
  })
137
137
 
138
138
  if (err) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  _anyToError,
3
- _errorToErrorObject,
3
+ _errorLikeToErrorObject,
4
4
  _filterUndefinedValues,
5
5
  AppError,
6
6
  BackendErrorResponseObject,
@@ -81,7 +81,7 @@ export function respondWithError(req: BackendRequest, res: BackendResponse, err:
81
81
 
82
82
  if (res.headersSent) return
83
83
 
84
- const httpError = _errorToErrorObject(originalError)
84
+ const httpError = _errorLikeToErrorObject(originalError)
85
85
  if (!includeErrorStack) delete httpError.stack
86
86
 
87
87
  httpError.data.errorId = errorId