File tree Expand file tree Collapse file tree 1 file changed +2
-26
lines changed
packages/wrangler/src/autoconfig Expand file tree Collapse file tree 1 file changed +2
-26
lines changed Original file line number Diff line number Diff line change 1- /**
2- * This is used to provide telemetry with a sanitised error
3- * message that could not have any user-identifying information.
4- * Set to `true` to duplicate `message`.
5- * */
6- type TelemetryMessage = {
7- telemetryMessage ?: string | true ;
8- } ;
1+ import { UserError } from "@cloudflare/workers-utils" ;
92
103/**
114 * Base class for errors where something in a autoconfig frameworks' configuration goes
125 * something wrong. These are not reported to Sentry.
136 */
14- export class AutoConfigFrameworkConfigurationError extends Error {
15- telemetryMessage : string | undefined ;
16- constructor (
17- message ?: string | undefined ,
18- options ?:
19- | ( {
20- cause ?: unknown ;
21- } & TelemetryMessage )
22- | undefined
23- ) {
24- super ( message , options ) ;
25- // Restore prototype chain:
26- // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget
27- Object . setPrototypeOf ( this , new . target . prototype ) ;
28- this . telemetryMessage =
29- options ?. telemetryMessage === true ? message : options ?. telemetryMessage ;
30- }
31- }
7+ export class AutoConfigFrameworkConfigurationError extends UserError { }
You can’t perform that action at this time.
0 commit comments