lambda-essentials-ts 5.1.2 → 5.1.4
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
|
|
7
|
+
## [5.1.4] - 2022-11-08
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
Using `baseURL` in the axios config without specifying the full URL resulted in an error in the exception handling. So the `AxiosError` was thrown instead of a customer `ClientException`.
|
|
12
|
+
|
|
13
|
+
## [5.1.3] - 2022-10-03
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
RequestLogger now logs only `Host`, 'User-Agent`, `orion-correlation-id-parent`, `orion-correlation-id-root` headers.
|
|
18
|
+
|
|
7
19
|
## [5.1.2] - 2022-09-14
|
|
8
20
|
|
|
9
21
|
### Changed
|
|
@@ -122,7 +122,9 @@ class HttpClient {
|
|
|
122
122
|
...HttpClient.extractRequestLogData(error.config),
|
|
123
123
|
error: serializedAxiosError,
|
|
124
124
|
});
|
|
125
|
-
const hostname = ((_a = error.config) === null || _a === void 0 ? void 0 : _a.url)
|
|
125
|
+
const hostname = ((_a = error.config) === null || _a === void 0 ? void 0 : _a.url)
|
|
126
|
+
? new url_1.URL(error.config.url, error.config.baseURL).hostname
|
|
127
|
+
: 'N/A';
|
|
126
128
|
throw new clientException_1.ClientException(hostname, serializedAxiosError === null || serializedAxiosError === void 0 ? void 0 : serializedAxiosError.status, serializedAxiosError === null || serializedAxiosError === void 0 ? void 0 : serializedAxiosError.details);
|
|
127
129
|
});
|
|
128
130
|
this.client.interceptors.response.use((response) => {
|
|
@@ -57,7 +57,12 @@ class OpenApiWrapper {
|
|
|
57
57
|
title: 'RequestLogger',
|
|
58
58
|
level: 'INFO',
|
|
59
59
|
body: request.body,
|
|
60
|
-
headers:
|
|
60
|
+
headers: {
|
|
61
|
+
Host: request.headers.Host,
|
|
62
|
+
'User-Agent': request.headers['User-Agent'],
|
|
63
|
+
'orion-correlation-id-parent': request.headers['orion-correlation-id-parent'],
|
|
64
|
+
'orion-correlation-id-root': request.headers['orion-correlation-id-root'],
|
|
65
|
+
},
|
|
61
66
|
method: request.httpMethod,
|
|
62
67
|
path: request.path,
|
|
63
68
|
user: this.userPrincipal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lambda-essentials-ts",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "A selection of the finest modules supporting authorization, API routing, error handling, logging and sending HTTP requests.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|