Skip to content

Commit 912760a

Browse files
committed
Bug1761485-expose-ErrorType-through-its-own-entry-point
1 parent 34e493f commit 912760a

File tree

15 files changed

+16
-15
lines changed

15 files changed

+16
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Unreleased changes
22

33
[Full changelog](https://github.com/mozilla/glean.js/compare/v1.0.0...main)
4-
4+
* [#1318](https://github.com/mozilla/glean.js/pull/1318): Expose `ErrorType` through its own entry point.
55
* [#1271](https://github.com/mozilla/glean.js/pull/1271): BUGFIX: Fix pings validation function when scanning pings database on initialize.
66
* This bug was preventing pings that contained custom headers from being successfully validated and enqueued on initialize.
77

glean/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "An implementation of the Glean SDK, a modern cross-platform telemetry client, for JavaScript environments.",
55
"type": "module",
66
"sideEffects": false,
7-
"exports": {
7+
"exports": {
8+
"./error": "./dist/core/error/error_type.js",
89
"./package.json": "./package.json",
910
"./private/metrics/*": "./dist/core/metrics/types/*.js",
1011
"./private/ping": "./dist/core/pings/ping_type.js",

glean/src/core/metrics/events_database/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
GLEAN_EXECUTION_COUNTER_EXTRA_KEY,
2020
GLEAN_REFERENCE_TIME_EXTRA_KEY
2121
} from "../../constants.js";
22-
import { ErrorType } from "../../error/error_type.js";
22+
import { ErrorType } from "@mozilla/glean/error";
2323

2424
const LOG_TAG = "core.Metric.EventsDatabase";
2525

glean/src/core/metrics/metric.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import type { JSONValue } from "../utils.js";
66
import type { MetricType } from "./index.js";
77
import { Context } from "../context.js";
8-
import { ErrorType } from "../error/error_type.js";
8+
import { ErrorType } from "@mozilla/glean/error";
99

1010
export enum MetricValidation {
1111
Success,

glean/src/core/metrics/types/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { RecordedEvent } from "../events_database/recorded_event.js";
88
import { MetricType } from "../index.js";
99
import { getMonotonicNow, isString, testOnlyCheck, truncateStringAtBoundaryWithError } from "../../utils.js";
1010
import { Context } from "../../context.js";
11-
import { ErrorType } from "../../error/error_type.js";
11+
import { ErrorType } from "@mozilla/glean/error";
1212
import { MetricValidationError } from "../metric.js";
1313

1414
const LOG_TAG = "core.metrics.EventMetricType";

glean/src/core/metrics/types/labeled.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { JSONValue } from "../../utils.js";
1010
import type { MetricValidationResult } from "../metric.js";
1111
import { Metric, MetricValidation } from "../metric.js";
1212
import { Context } from "../../context.js";
13-
import { ErrorType } from "../../error/error_type.js";
13+
import { ErrorType } from "@mozilla/glean/error";
1414

1515
/**
1616
* This is an internal metric representation for labeled metrics.

glean/src/core/metrics/types/quantity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Context } from "../../context.js";
99
import type { MetricValidationResult } from "../metric.js";
1010
import { Metric, MetricValidationError } from "../metric.js";
1111
import { validatePositiveInteger } from "../utils.js";
12-
import { ErrorType } from "../../error/error_type.js";
12+
import { ErrorType } from "@mozilla/glean/error";
1313

1414
const LOG_TAG = "core.metrics.QuantityMetricType";
1515

glean/src/core/metrics/types/string_list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { MetricValidationResult } from "../metric.js";
99
import { Metric, MetricValidation, MetricValidationError } from "../metric.js";
1010
import { testOnlyCheck, truncateStringAtBoundaryWithError } from "../../utils.js";
1111
import type { JSONValue } from "../../utils.js";
12-
import { ErrorType } from "../../error/error_type.js";
12+
import { ErrorType } from "@mozilla/glean/error";
1313
import log from "../../log.js";
1414
import { validateString } from "../utils.js";
1515

glean/src/core/metrics/types/timespan.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { MetricValidationResult } from "../metric.js";
1212
import { MetricValidation , MetricValidationError} from "../metric.js";
1313
import { Metric } from "../metric.js";
1414
import { Context } from "../../context.js";
15-
import { ErrorType } from "../../error/error_type.js";
15+
import { ErrorType } from "@mozilla/glean/error";
1616

1717
const LOG_TAG = "core.metrics.TimespanMetricType";
1818

glean/src/core/metrics/types/url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { MetricType } from "../index.js";
88
import { Context } from "../../context.js";
99
import type { MetricValidationResult } from "../metric.js";
1010
import { MetricValidationError, MetricValidation, Metric } from "../metric.js";
11-
import { ErrorType } from "../../error/error_type.js";
11+
import { ErrorType } from "@mozilla/glean/error";
1212
import { validateString } from "../utils.js";
1313

1414
const LOG_TAG = "core.metrics.URLMetricType";

0 commit comments

Comments
 (0)