Skip to content

Commit d77b079

Browse files
committed
Bump @hapi/boom to v9.1.1
This fixes a TypeScript error which means we can get rid of a few ts-expect-error comments.
1 parent 31b9a26 commit d77b079

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"@elastic/request-crypto": "1.1.4",
112112
"@elastic/safer-lodash-set": "link:packages/elastic-safer-lodash-set",
113113
"@elastic/search-ui-app-search-connector": "^1.5.0",
114-
"@hapi/boom": "^9.1.0",
114+
"@hapi/boom": "^9.1.1",
115115
"@hapi/cookie": "^11.0.2",
116116
"@hapi/good-squeeze": "6.0.0",
117117
"@hapi/h2o2": "^9.0.2",

src/core/server/http/router/response_adapter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export class HapiResponseAdapter {
137137

138138
const attributes = getErrorAttributes(payload);
139139
if (attributes) {
140-
// @ts-expect-error Custom properties on `output.payload` aren't allowed by TS, however, it's the only way to send custom data to the client (https://github.com/hapijs/boom/issues/277).
141140
error.output.payload.attributes = attributes;
142141
}
143142

src/core/server/saved_objects/export/get_sorted_objects_for_export.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ async function fetchByObjects({
154154
const erroredObjects = bulkGetResult.saved_objects.filter((obj) => !!obj.error);
155155
if (erroredObjects.length) {
156156
const err = Boom.badRequest();
157-
// @ts-expect-error Custom properties on `output.payload` aren't allowed by TS, however, it's the only way to send custom data to the client (https://github.com/hapijs/boom/issues/277).
158157
err.output.payload.attributes = {
159158
objects: erroredObjects,
160159
};

src/core/server/saved_objects/import/validate_references.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export async function getNonExistingReferenceAsKeys(
7171
);
7272
if (erroredObjects.length) {
7373
const err = Boom.badRequest();
74-
// @ts-expect-error Custom properties on `output.payload` aren't allowed by TS, however, it's the only way to send custom data to the client (https://github.com/hapijs/boom/issues/277).
7574
err.output.payload.attributes = {
7675
objects: erroredObjects,
7776
};

x-pack/plugins/transform/server/routes/api/error_utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export function wrapEsError(err: any, statusCodeToMessageMap: Record<string, any
130130
const causedByChain = extractCausedByChain(caused_by);
131131
const defaultCause = root_cause.length ? extractCausedByChain(root_cause[0]) : undefined;
132132

133-
// @ts-expect-error cause is not defined on payload type
134133
boomError.output.payload.cause = causedByChain.length ? causedByChain : defaultCause;
135134

136135
// Set error message based on the root cause

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,10 +1794,10 @@
17941794
dependencies:
17951795
"@hapi/hoek" "9.x.x"
17961796

1797-
"@hapi/[email protected]", "@hapi/boom@^9.0.0", "@hapi/boom@^9.1.0":
1798-
version "9.1.0"
1799-
resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-9.1.0.tgz#0d9517657a56ff1e0b42d0aca9da1b37706fec56"
1800-
integrity sha512-4nZmpp4tXbm162LaZT45P7F7sgiem8dwAh2vHWT6XX24dozNjGMg6BvKCRvtCUcmcXqeMIUqWN8Rc5X8yKuROQ==
1797+
"@hapi/[email protected]", "@hapi/boom@^9.0.0", "@hapi/boom@^9.1.1":
1798+
version "9.1.1"
1799+
resolved "https://registry.yarnpkg.com/@hapi/boom/-/boom-9.1.1.tgz#89e6f0e01637c2a4228da0d113e8157c93677b04"
1800+
integrity sha512-VNR8eDbBrOxBgbkddRYIe7+8DZ+vSbV6qlmaN2x7eWjsUjy2VmQgChkOKcVZIeupEZYj+I0dqNg430OhwzagjA==
18011801
dependencies:
18021802
"@hapi/hoek" "9.x.x"
18031803

0 commit comments

Comments
 (0)