@fluidframework/container-utils
Advanced tools
Comparing version 2.0.0-internal.1.2.0.93071 to 2.0.0-internal.1.2.1
@@ -69,3 +69,4 @@ /*! | ||
/** | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type. | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type | ||
* with the exception of a normalized LoggingError, which will still be wrapped. | ||
* In either case, the error will have some relevant properties added for telemetry | ||
@@ -72,0 +73,0 @@ * We wrap conditionally since known error types represent well-understood failure modes, and ideally |
@@ -96,3 +96,4 @@ "use strict"; | ||
/** | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type. | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type | ||
* with the exception of a normalized LoggingError, which will still be wrapped. | ||
* In either case, the error will have some relevant properties added for telemetry | ||
@@ -110,10 +111,12 @@ * We wrap conditionally since known error types represent well-understood failure modes, and ideally | ||
const normalizedError = (0, telemetry_utils_1.normalizeError)(originalError, { props }); | ||
if (!(0, telemetry_utils_1.isExternalError)(normalizedError)) { | ||
return normalizedError; | ||
// Note that other errors may have the NORMALIZED_ERROR_TYPE errorType, | ||
// but if so they are still suitable to be wrapped as DataProcessingError. | ||
if ((0, telemetry_utils_1.isExternalError)(normalizedError) || normalizedError.errorType === telemetry_utils_1.NORMALIZED_ERROR_TYPE) { | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = (0, telemetry_utils_1.wrapError)(normalizedError, (message) => new DataProcessingError(message)); | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
} | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = (0, telemetry_utils_1.wrapError)(normalizedError, (message) => new DataProcessingError(message)); | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
return normalizedError; | ||
} | ||
@@ -120,0 +123,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/container-utils"; | ||
export declare const pkgVersion = "2.0.0-internal.1.2.0.93071"; | ||
export declare const pkgVersion = "2.0.0-internal.1.2.1"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
exports.pkgName = "@fluidframework/container-utils"; | ||
exports.pkgVersion = "2.0.0-internal.1.2.0.93071"; | ||
exports.pkgVersion = "2.0.0-internal.1.2.1"; | ||
//# sourceMappingURL=packageVersion.js.map |
@@ -69,3 +69,4 @@ /*! | ||
/** | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type. | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type | ||
* with the exception of a normalized LoggingError, which will still be wrapped. | ||
* In either case, the error will have some relevant properties added for telemetry | ||
@@ -72,0 +73,0 @@ * We wrap conditionally since known error types represent well-understood failure modes, and ideally |
@@ -6,3 +6,3 @@ /*! | ||
import { ContainerErrorType, } from "@fluidframework/container-definitions"; | ||
import { LoggingError, normalizeError, wrapError, wrapErrorAndLog, isExternalError, } from "@fluidframework/telemetry-utils"; | ||
import { LoggingError, normalizeError, wrapError, wrapErrorAndLog, isExternalError, NORMALIZED_ERROR_TYPE, } from "@fluidframework/telemetry-utils"; | ||
/** | ||
@@ -89,3 +89,4 @@ * Generic wrapper for an unrecognized/uncategorized error object | ||
/** | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type. | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type | ||
* with the exception of a normalized LoggingError, which will still be wrapped. | ||
* In either case, the error will have some relevant properties added for telemetry | ||
@@ -103,10 +104,12 @@ * We wrap conditionally since known error types represent well-understood failure modes, and ideally | ||
const normalizedError = normalizeError(originalError, { props }); | ||
if (!isExternalError(normalizedError)) { | ||
return normalizedError; | ||
// Note that other errors may have the NORMALIZED_ERROR_TYPE errorType, | ||
// but if so they are still suitable to be wrapped as DataProcessingError. | ||
if (isExternalError(normalizedError) || normalizedError.errorType === NORMALIZED_ERROR_TYPE) { | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = wrapError(normalizedError, (message) => new DataProcessingError(message)); | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
} | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = wrapError(normalizedError, (message) => new DataProcessingError(message)); | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
return normalizedError; | ||
} | ||
@@ -113,0 +116,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
export declare const pkgName = "@fluidframework/container-utils"; | ||
export declare const pkgVersion = "2.0.0-internal.1.2.0.93071"; | ||
export declare const pkgVersion = "2.0.0-internal.1.2.1"; | ||
//# sourceMappingURL=packageVersion.d.ts.map |
@@ -8,3 +8,3 @@ /*! | ||
export const pkgName = "@fluidframework/container-utils"; | ||
export const pkgVersion = "2.0.0-internal.1.2.0.93071"; | ||
export const pkgVersion = "2.0.0-internal.1.2.1"; | ||
//# sourceMappingURL=packageVersion.js.map |
{ | ||
"name": "@fluidframework/container-utils", | ||
"version": "2.0.0-internal.1.2.0.93071", | ||
"version": "2.0.0-internal.1.2.1", | ||
"description": "Fluid container utils", | ||
@@ -64,5 +64,5 @@ "homepage": "https://fluidframework.com", | ||
"@fluidframework/common-utils": "^1.0.0", | ||
"@fluidframework/container-definitions": "2.0.0-internal.1.2.0.93071", | ||
"@fluidframework/container-definitions": "^2.0.0-internal.1.2.1", | ||
"@fluidframework/protocol-definitions": "^1.0.0", | ||
"@fluidframework/telemetry-utils": "2.0.0-internal.1.2.0.93071" | ||
"@fluidframework/telemetry-utils": "^2.0.0-internal.1.2.1" | ||
}, | ||
@@ -73,5 +73,5 @@ "devDependencies": { | ||
"@fluidframework/container-utils-previous": "npm:@fluidframework/container-utils@^1.0.0", | ||
"@fluidframework/eslint-config-fluid": "^0.28.2000", | ||
"@fluidframework/mocha-test-setup": "2.0.0-internal.1.2.0.93071", | ||
"@fluidframework/test-runtime-utils": "2.0.0-internal.1.2.0.93071", | ||
"@fluidframework/eslint-config-fluid": "^1.0.0", | ||
"@fluidframework/mocha-test-setup": "^2.0.0-internal.1.2.1", | ||
"@fluidframework/test-runtime-utils": "^2.0.0-internal.1.2.1", | ||
"@microsoft/api-extractor": "^7.22.2", | ||
@@ -78,0 +78,0 @@ "@rushstack/eslint-config": "^2.5.1", |
@@ -19,2 +19,3 @@ /*! | ||
isExternalError, | ||
NORMALIZED_ERROR_TYPE, | ||
} from "@fluidframework/telemetry-utils"; | ||
@@ -146,3 +147,4 @@ import { ITelemetryLogger, ITelemetryProperties } from "@fluidframework/common-definitions"; | ||
/** | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type. | ||
* Wrap the given error in a DataProcessingError, unless the error is already of a known type | ||
* with the exception of a normalized LoggingError, which will still be wrapped. | ||
* In either case, the error will have some relevant properties added for telemetry | ||
@@ -169,15 +171,15 @@ * We wrap conditionally since known error types represent well-understood failure modes, and ideally | ||
const normalizedError = normalizeError(originalError, { props }); | ||
// Note that other errors may have the NORMALIZED_ERROR_TYPE errorType, | ||
// but if so they are still suitable to be wrapped as DataProcessingError. | ||
if (isExternalError(normalizedError) || normalizedError.errorType === NORMALIZED_ERROR_TYPE) { | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = | ||
wrapError(normalizedError, (message: string) => new DataProcessingError(message)); | ||
if (!isExternalError(normalizedError)) { | ||
return normalizedError; | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
} | ||
// Create a new DataProcessingError to wrap this external error | ||
const dataProcessingError = | ||
wrapError(normalizedError, (message: string) => new DataProcessingError(message)); | ||
// Copy over the props above and any others added to this error since first being normalized | ||
dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties()); | ||
return dataProcessingError; | ||
return normalizedError; | ||
} | ||
@@ -184,0 +186,0 @@ } |
@@ -9,2 +9,2 @@ /*! | ||
export const pkgName = "@fluidframework/container-utils"; | ||
export const pkgVersion = "2.0.0-internal.1.2.0.93071"; | ||
export const pkgVersion = "2.0.0-internal.1.2.1"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66447
729
+ Added@fluid-internal/client-utils@2.20.0(transitive)
+ Added@fluidframework/container-definitions@2.20.0(transitive)
+ Added@fluidframework/core-interfaces@2.20.0(transitive)
+ Added@fluidframework/core-utils@2.20.0(transitive)
+ Added@fluidframework/driver-definitions@2.20.0(transitive)
+ Added@fluidframework/telemetry-utils@2.20.0(transitive)
+ Addeduuid@9.0.1(transitive)
- Removed@fluidframework/container-definitions@2.0.0-internal.1.2.0.93071(transitive)
- Removed@fluidframework/core-interfaces@2.0.0-internal.1.2.0.93071(transitive)
- Removed@fluidframework/driver-definitions@2.0.0-internal.1.2.0.93071(transitive)
- Removed@fluidframework/telemetry-utils@2.0.0-internal.1.2.0.93071(transitive)
- Removeduuid@8.3.2(transitive)
Updated@fluidframework/container-definitions@^2.0.0-internal.1.2.1
Updated@fluidframework/telemetry-utils@^2.0.0-internal.1.2.1