@netlify/build 29.26.3 → 29.26.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/lib/core/dev.d.ts +2 -2
- package/lib/error/handle.d.ts +1 -16
- package/lib/error/info.d.ts +6 -6
- package/lib/error/parse/location.d.ts +2 -2
- package/lib/error/parse/parse.d.ts +4 -36
- package/lib/error/parse/parse.js +5 -2
- package/lib/error/parse/plugin.d.ts +15 -5
- package/lib/error/parse/plugin.js +1 -1
- package/lib/error/parse/serialize_log.d.ts +5 -12
- package/lib/error/types.d.ts +170 -0
- package/lib/error/types.js +338 -0
- package/lib/log/messages/core_steps.js +1 -1
- package/lib/tracing/main.js +4 -3
- package/package.json +2 -2
- package/lib/error/type.d.ts +0 -3
- package/lib/error/type.js +0 -182
package/lib/core/dev.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export function startDev(devCommand: any, flags?: {}): Promise<{
|
|
|
10
10
|
severityCode: number;
|
|
11
11
|
logs: import("../log/logger.js").BufferedLogs | undefined;
|
|
12
12
|
error: {
|
|
13
|
-
message:
|
|
14
|
-
stack:
|
|
13
|
+
message: string;
|
|
14
|
+
stack: string;
|
|
15
15
|
};
|
|
16
16
|
netlifyConfig?: undefined;
|
|
17
17
|
configMutations?: undefined;
|
package/lib/error/handle.d.ts
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
1
|
import { ErrorParam } from '../core/types.js';
|
|
2
|
-
export declare const handleBuildError: (error: Error, { errorMonitor, netlifyConfig, childEnv, logs, debug, testOpts }: ErrorParam) => Promise<
|
|
3
|
-
message: any;
|
|
4
|
-
stack: any;
|
|
5
|
-
errorProps: any;
|
|
6
|
-
errorInfo: any;
|
|
7
|
-
type: any;
|
|
8
|
-
severity: any;
|
|
9
|
-
title: any;
|
|
10
|
-
group: any;
|
|
11
|
-
stackType: any;
|
|
12
|
-
locationType: any;
|
|
13
|
-
showInBuildLog: any;
|
|
14
|
-
showErrorProps: any;
|
|
15
|
-
rawStack: any;
|
|
16
|
-
errorMetadata: any;
|
|
17
|
-
}>;
|
|
2
|
+
export declare const handleBuildError: (error: Error, { errorMonitor, netlifyConfig, childEnv, logs, debug, testOpts }: ErrorParam) => Promise<import("./types.js").BasicErrorInfo>;
|
package/lib/error/info.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export const CUSTOM_ERROR_KEY
|
|
1
|
+
export declare const addDefaultErrorInfo: (error: any, info: any) => void;
|
|
2
|
+
export declare const addErrorInfo: (error: any, info: any) => void;
|
|
3
|
+
export declare const getErrorInfo: (error: any) => any[];
|
|
4
|
+
export declare const changeErrorType: (error: any, oldType: any, newType: any) => void;
|
|
5
|
+
export declare const isBuildError: (error: any) => boolean;
|
|
6
|
+
export declare const CUSTOM_ERROR_KEY = "customErrorInfo";
|
|
@@ -1,39 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BuildError, BasicErrorInfo } from '../types.js';
|
|
2
|
+
export declare const getFullErrorInfo: ({ error, colors, debug }: {
|
|
2
3
|
error: any;
|
|
3
4
|
colors: any;
|
|
4
5
|
debug: any;
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
message: any;
|
|
8
|
-
tsConfigInfo: any;
|
|
9
|
-
pluginInfo: string | undefined;
|
|
10
|
-
locationInfo: any;
|
|
11
|
-
errorProps: string | undefined;
|
|
12
|
-
errorMetadata: any;
|
|
13
|
-
stack: any;
|
|
14
|
-
errorInfo: any;
|
|
15
|
-
type: any;
|
|
16
|
-
severity: any;
|
|
17
|
-
group: any;
|
|
18
|
-
stackType: any;
|
|
19
|
-
locationType: any;
|
|
20
|
-
showInBuildLog: any;
|
|
21
|
-
showErrorProps: any;
|
|
22
|
-
rawStack: any;
|
|
23
|
-
};
|
|
24
|
-
export function parseErrorInfo(error: any): {
|
|
25
|
-
message: any;
|
|
26
|
-
stack: any;
|
|
27
|
-
errorProps: any;
|
|
28
|
-
errorInfo: any;
|
|
29
|
-
type: any;
|
|
30
|
-
severity: any;
|
|
31
|
-
title: any;
|
|
32
|
-
group: any;
|
|
33
|
-
stackType: any;
|
|
34
|
-
locationType: any;
|
|
35
|
-
showInBuildLog: any;
|
|
36
|
-
showErrorProps: any;
|
|
37
|
-
rawStack: any;
|
|
38
|
-
errorMetadata: any;
|
|
39
|
-
};
|
|
6
|
+
}) => BuildError;
|
|
7
|
+
export declare const parseErrorInfo: (error: Error) => BasicErrorInfo;
|
package/lib/error/parse/parse.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { serializeObject } from '../../log/serialize.js';
|
|
2
2
|
import { getErrorInfo } from '../info.js';
|
|
3
|
-
import { getTypeInfo } from '../
|
|
3
|
+
import { getTypeInfo } from '../types.js';
|
|
4
4
|
import { getLocationInfo } from './location.js';
|
|
5
5
|
import { normalizeError } from './normalize.js';
|
|
6
6
|
import { getPluginInfo } from './plugin.js';
|
|
@@ -9,9 +9,12 @@ import { getStackInfo } from './stack.js';
|
|
|
9
9
|
// Add additional type-specific error information
|
|
10
10
|
export const getFullErrorInfo = function ({ error, colors, debug }) {
|
|
11
11
|
const basicErrorInfo = parseErrorInfo(error);
|
|
12
|
-
const { message, stack, errorProps, errorInfo,
|
|
12
|
+
const { message, stack, errorProps, errorInfo, severity, title, stackType, locationType, showErrorProps, rawStack, errorMetadata, } = basicErrorInfo;
|
|
13
|
+
const { location = {}, plugin = {}, tsConfig } = errorInfo;
|
|
13
14
|
const titleA = getTitle(title, errorInfo);
|
|
14
15
|
const { message: messageA, stack: stackA } = getStackInfo({ message, stack, stackType, rawStack, severity, debug });
|
|
16
|
+
// FIXME here location should be PluginLocation type, but I'm affraid to mess up the current
|
|
17
|
+
// getPluginInfo behaviour by running a type check
|
|
15
18
|
const pluginInfo = getPluginInfo(plugin, location);
|
|
16
19
|
const tsConfigInfo = getTsConfigInfo(tsConfig);
|
|
17
20
|
const locationInfo = getLocationInfo({ stack: stackA, location, locationType });
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const getPluginInfo: ({ pluginPackageJson }: {
|
|
2
2
|
pluginPackageJson?: {} | undefined;
|
|
3
3
|
}, { packageName, loadedFrom }: {
|
|
4
4
|
packageName: any;
|
|
5
5
|
loadedFrom: any;
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
}) => string | undefined;
|
|
7
|
+
type pkgJSONData = {
|
|
8
|
+
name?: string;
|
|
9
|
+
bugs?: {
|
|
10
|
+
url?: string;
|
|
11
|
+
};
|
|
12
|
+
repository?: {
|
|
13
|
+
url?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const getHomepage: (pluginPackageJson?: pkgJSONData, { loadedFrom }?: {
|
|
17
|
+
loadedFrom?: string | undefined;
|
|
18
|
+
}) => string | undefined;
|
|
19
|
+
export {};
|
|
@@ -19,7 +19,7 @@ const serializeField = function ({ name, getField, pluginPackageJson, packageNam
|
|
|
19
19
|
return `${nameA}${field}`;
|
|
20
20
|
};
|
|
21
21
|
const NAME_PADDING = 16;
|
|
22
|
-
const getPackage = function (
|
|
22
|
+
const getPackage = function (_, { packageName }) {
|
|
23
23
|
return packageName;
|
|
24
24
|
};
|
|
25
25
|
const getVersion = function ({ version }) {
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
pluginInfo: any;
|
|
7
|
-
locationInfo: any;
|
|
8
|
-
tsConfigInfo: any;
|
|
9
|
-
errorProps: any;
|
|
10
|
-
};
|
|
11
|
-
}): {
|
|
12
|
-
title: any;
|
|
1
|
+
import type { BuildError } from '../types.js';
|
|
2
|
+
export declare const serializeLogError: ({ fullErrorInfo: { title, severity, message, pluginInfo, locationInfo, tsConfigInfo, errorProps }, }: {
|
|
3
|
+
fullErrorInfo: BuildError;
|
|
4
|
+
}) => {
|
|
5
|
+
title: string | (import("../types.js").TitleFunction & string);
|
|
13
6
|
body: any;
|
|
14
7
|
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { Attributes } from '@opentelemetry/api';
|
|
2
|
+
export type BuildError = Omit<BasicErrorInfo, 'errorProps'> & {
|
|
3
|
+
title: string;
|
|
4
|
+
pluginInfo?: string;
|
|
5
|
+
locationInfo?: string;
|
|
6
|
+
errorProps?: string;
|
|
7
|
+
};
|
|
8
|
+
export type BasicErrorInfo = {
|
|
9
|
+
message: string;
|
|
10
|
+
stack: string;
|
|
11
|
+
severity: string;
|
|
12
|
+
type: ErrorTypes;
|
|
13
|
+
errorInfo: ErrorInfo;
|
|
14
|
+
errorProps: Record<string, unknown>;
|
|
15
|
+
errorMetadata: any;
|
|
16
|
+
tsConfigInfo?: any;
|
|
17
|
+
} & ErrorType;
|
|
18
|
+
/**
|
|
19
|
+
* Error severity groups the errors emitted by build and used to translate to exit code via SEVERITY_MAP
|
|
20
|
+
*/
|
|
21
|
+
declare enum ErrorSeverity {
|
|
22
|
+
/**
|
|
23
|
+
* build success
|
|
24
|
+
*/
|
|
25
|
+
success = "success",
|
|
26
|
+
/**
|
|
27
|
+
* not an error, e.g. build cancellation
|
|
28
|
+
*/
|
|
29
|
+
none = "none",
|
|
30
|
+
/**
|
|
31
|
+
* user error
|
|
32
|
+
*/
|
|
33
|
+
info = "info",
|
|
34
|
+
/**
|
|
35
|
+
* community plugin error
|
|
36
|
+
*/
|
|
37
|
+
warning = "warning",
|
|
38
|
+
/**
|
|
39
|
+
* system error, including core plugin error
|
|
40
|
+
*/
|
|
41
|
+
error = "Error"
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* How the stack trace should appear in the build error logs
|
|
45
|
+
*/
|
|
46
|
+
declare enum StackType {
|
|
47
|
+
/**
|
|
48
|
+
* not printed
|
|
49
|
+
*/
|
|
50
|
+
none = "none",
|
|
51
|
+
/**
|
|
52
|
+
* printed as is
|
|
53
|
+
*/
|
|
54
|
+
stack = "stack",
|
|
55
|
+
/**
|
|
56
|
+
* printed as is, but taken from `error.message`. Used when `error.stack` is not being correct due to the error being passed between different processes.
|
|
57
|
+
*/
|
|
58
|
+
message = "message"
|
|
59
|
+
}
|
|
60
|
+
type GroupFunction = ({ location }: {
|
|
61
|
+
location: ErrorLocation;
|
|
62
|
+
}) => string;
|
|
63
|
+
export type TitleFunction = ({ location }: {
|
|
64
|
+
location: ErrorLocation;
|
|
65
|
+
}) => string;
|
|
66
|
+
export type ErrorInfo = {
|
|
67
|
+
plugin?: any;
|
|
68
|
+
tsConfig?: any;
|
|
69
|
+
location: ErrorLocation;
|
|
70
|
+
};
|
|
71
|
+
export type BuildCommandLocation = {
|
|
72
|
+
buildCommand: string;
|
|
73
|
+
buildCommandOrigin: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const isBuildCommandLocation: (location?: ErrorLocation) => location is BuildCommandLocation;
|
|
76
|
+
export type FunctionsBundlingLocation = {
|
|
77
|
+
functionName: string;
|
|
78
|
+
functionType: string;
|
|
79
|
+
};
|
|
80
|
+
export declare const isFunctionsBundlingLocation: (location?: ErrorLocation) => location is FunctionsBundlingLocation;
|
|
81
|
+
export type CoreStepLocation = {
|
|
82
|
+
coreStepName: string;
|
|
83
|
+
};
|
|
84
|
+
export declare const isCoreStepLocation: (location?: ErrorLocation) => location is CoreStepLocation;
|
|
85
|
+
export type PluginLocation = {
|
|
86
|
+
event: string;
|
|
87
|
+
packageName: string;
|
|
88
|
+
loadedFrom: string;
|
|
89
|
+
origin: string;
|
|
90
|
+
input?: string;
|
|
91
|
+
};
|
|
92
|
+
export declare const isPluginLocation: (location?: ErrorLocation) => location is PluginLocation;
|
|
93
|
+
export type APILocation = {
|
|
94
|
+
endpoint: string;
|
|
95
|
+
parameters?: any;
|
|
96
|
+
};
|
|
97
|
+
export declare const isAPILocation: (location?: ErrorLocation) => location is APILocation;
|
|
98
|
+
export type ErrorLocation = BuildCommandLocation | FunctionsBundlingLocation | CoreStepLocation | PluginLocation | APILocation;
|
|
99
|
+
/**
|
|
100
|
+
* Given a BuildError, extract the relevant trace attributes to add to the on-going Span
|
|
101
|
+
*/
|
|
102
|
+
export declare const buildErrorToTracingAttributes: (error: BuildError | BasicErrorInfo) => Attributes;
|
|
103
|
+
/**
|
|
104
|
+
* Retrieve error-type specific information
|
|
105
|
+
*/
|
|
106
|
+
export declare const getTypeInfo: ({ type }: {
|
|
107
|
+
type: any;
|
|
108
|
+
}) => any;
|
|
109
|
+
/**
|
|
110
|
+
* Interface for build error types
|
|
111
|
+
*/
|
|
112
|
+
export interface ErrorType {
|
|
113
|
+
/**
|
|
114
|
+
* main title shown in build error logs and in the UI (statuses)
|
|
115
|
+
*/
|
|
116
|
+
title: TitleFunction | string;
|
|
117
|
+
/**
|
|
118
|
+
* retrieve a human-friendly location of the error, printed
|
|
119
|
+
*/
|
|
120
|
+
locationType?: string;
|
|
121
|
+
/**
|
|
122
|
+
* `true` when the `Error` instance static properties
|
|
123
|
+
*/
|
|
124
|
+
showErrorProps?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* `true` when the stack trace should be cleaned up
|
|
127
|
+
*/
|
|
128
|
+
rawStack?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* `true` when we want this error to show in build logs (defaults to true)
|
|
131
|
+
*/
|
|
132
|
+
showInBuildLog?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* main title shown in Bugsnag. Also used to group errors together in Bugsnag, combined with `error.message`. Defaults to `title`.
|
|
135
|
+
*/
|
|
136
|
+
group?: GroupFunction;
|
|
137
|
+
/**
|
|
138
|
+
* error severity (also used by Bugsnag)
|
|
139
|
+
*/
|
|
140
|
+
severity: keyof typeof ErrorSeverity;
|
|
141
|
+
/**
|
|
142
|
+
* how the stack trace should appear in build error logs
|
|
143
|
+
*/
|
|
144
|
+
stackType: keyof typeof StackType;
|
|
145
|
+
}
|
|
146
|
+
declare const ErrorTypeMap: {
|
|
147
|
+
/**
|
|
148
|
+
* Plugin called `utils.build.cancelBuild()`
|
|
149
|
+
*/
|
|
150
|
+
readonly cancelBuild: "cancelBuild";
|
|
151
|
+
readonly resolveConfig: "resolveConfig";
|
|
152
|
+
readonly dependencies: "dependencies";
|
|
153
|
+
readonly pluginInput: "pluginInput";
|
|
154
|
+
readonly pluginUnsupportedVersion: "pluginUnsupportedVersion";
|
|
155
|
+
readonly buildCommand: "buildCommand";
|
|
156
|
+
readonly functionsBundling: "functionsBundling";
|
|
157
|
+
readonly secretScanningFoundSecrets: "secretScanningFoundSecrets";
|
|
158
|
+
readonly failPlugin: "failPlugin";
|
|
159
|
+
readonly failBuild: "failBuild";
|
|
160
|
+
readonly pluginValidation: "pluginValidation";
|
|
161
|
+
readonly pluginInternal: "pluginInternal";
|
|
162
|
+
readonly ipc: "ipc";
|
|
163
|
+
readonly corePlugin: "corePlugin";
|
|
164
|
+
readonly coreStep: "coreStep";
|
|
165
|
+
readonly api: "api";
|
|
166
|
+
readonly exception: "exception";
|
|
167
|
+
readonly telemetry: "telemetry";
|
|
168
|
+
};
|
|
169
|
+
type ErrorTypes = keyof typeof ErrorTypeMap;
|
|
170
|
+
export {};
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error severity groups the errors emitted by build and used to translate to exit code via SEVERITY_MAP
|
|
3
|
+
*/
|
|
4
|
+
var ErrorSeverity;
|
|
5
|
+
(function (ErrorSeverity) {
|
|
6
|
+
/**
|
|
7
|
+
* build success
|
|
8
|
+
*/
|
|
9
|
+
ErrorSeverity["success"] = "success";
|
|
10
|
+
/**
|
|
11
|
+
* not an error, e.g. build cancellation
|
|
12
|
+
*/
|
|
13
|
+
ErrorSeverity["none"] = "none";
|
|
14
|
+
/**
|
|
15
|
+
* user error
|
|
16
|
+
*/
|
|
17
|
+
ErrorSeverity["info"] = "info";
|
|
18
|
+
/**
|
|
19
|
+
* community plugin error
|
|
20
|
+
*/
|
|
21
|
+
ErrorSeverity["warning"] = "warning";
|
|
22
|
+
/**
|
|
23
|
+
* system error, including core plugin error
|
|
24
|
+
*/
|
|
25
|
+
ErrorSeverity["error"] = "Error";
|
|
26
|
+
})(ErrorSeverity || (ErrorSeverity = {}));
|
|
27
|
+
/**
|
|
28
|
+
* How the stack trace should appear in the build error logs
|
|
29
|
+
*/
|
|
30
|
+
var StackType;
|
|
31
|
+
(function (StackType) {
|
|
32
|
+
/**
|
|
33
|
+
* not printed
|
|
34
|
+
*/
|
|
35
|
+
StackType["none"] = "none";
|
|
36
|
+
/**
|
|
37
|
+
* printed as is
|
|
38
|
+
*/
|
|
39
|
+
StackType["stack"] = "stack";
|
|
40
|
+
/**
|
|
41
|
+
* printed as is, but taken from `error.message`. Used when `error.stack` is not being correct due to the error being passed between different processes.
|
|
42
|
+
*/
|
|
43
|
+
StackType["message"] = "message";
|
|
44
|
+
})(StackType || (StackType = {}));
|
|
45
|
+
export const isBuildCommandLocation = function (location) {
|
|
46
|
+
const buildLocation = location;
|
|
47
|
+
return typeof buildLocation?.buildCommand === 'string' && typeof buildLocation?.buildCommandOrigin === 'string';
|
|
48
|
+
};
|
|
49
|
+
export const isFunctionsBundlingLocation = function (location) {
|
|
50
|
+
const bundlingLocation = location;
|
|
51
|
+
return typeof bundlingLocation?.functionName === 'string' && typeof bundlingLocation?.functionType === 'string';
|
|
52
|
+
};
|
|
53
|
+
export const isCoreStepLocation = function (location) {
|
|
54
|
+
return typeof location?.coreStepName === 'string';
|
|
55
|
+
};
|
|
56
|
+
export const isPluginLocation = function (location) {
|
|
57
|
+
const pluginLocation = location;
|
|
58
|
+
return (typeof pluginLocation?.event === 'string' &&
|
|
59
|
+
typeof pluginLocation?.packageName === 'string' &&
|
|
60
|
+
typeof pluginLocation?.loadedFrom === 'string');
|
|
61
|
+
};
|
|
62
|
+
export const isAPILocation = function (location) {
|
|
63
|
+
return typeof location?.endpoint === 'string';
|
|
64
|
+
};
|
|
65
|
+
const buildErrorAttributePrefix = 'build.error';
|
|
66
|
+
const errorLocationToTracingAttributes = function (location) {
|
|
67
|
+
const locationAttributePrefix = `${buildErrorAttributePrefix}.location`;
|
|
68
|
+
if (isBuildCommandLocation(location)) {
|
|
69
|
+
return {
|
|
70
|
+
[`${locationAttributePrefix}.command`]: location.buildCommand,
|
|
71
|
+
[`${locationAttributePrefix}.command_origin`]: location.buildCommandOrigin,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (isPluginLocation(location)) {
|
|
75
|
+
return {
|
|
76
|
+
[`${locationAttributePrefix}.plugin.event`]: location.event,
|
|
77
|
+
[`${locationAttributePrefix}.plugin.package_name`]: location.packageName,
|
|
78
|
+
[`${locationAttributePrefix}.plugin.loaded_from`]: location.loadedFrom,
|
|
79
|
+
[`${locationAttributePrefix}.plugin.origin`]: location.origin,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
if (isFunctionsBundlingLocation(location)) {
|
|
83
|
+
return {
|
|
84
|
+
[`${locationAttributePrefix}.function.type`]: location.functionType,
|
|
85
|
+
[`${locationAttributePrefix}.function.name`]: location.functionName,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (isCoreStepLocation(location)) {
|
|
89
|
+
return {
|
|
90
|
+
[`${locationAttributePrefix}.core_step.name`]: location.coreStepName,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (isAPILocation(location)) {
|
|
94
|
+
return {
|
|
95
|
+
[`${locationAttributePrefix}.api.endpoint`]: location.endpoint,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return {};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Given a BuildError, extract the relevant trace attributes to add to the on-going Span
|
|
102
|
+
*/
|
|
103
|
+
export const buildErrorToTracingAttributes = function (error) {
|
|
104
|
+
const attributes = {};
|
|
105
|
+
// Check we're not adding undefined values
|
|
106
|
+
if (error?.severity)
|
|
107
|
+
attributes[`${buildErrorAttributePrefix}.severity`] = error.severity;
|
|
108
|
+
if (error?.type)
|
|
109
|
+
attributes[`${buildErrorAttributePrefix}.type`] = error.type;
|
|
110
|
+
if (error?.locationType)
|
|
111
|
+
attributes[`${buildErrorAttributePrefix}.location.type`] = error.locationType;
|
|
112
|
+
return {
|
|
113
|
+
...attributes,
|
|
114
|
+
...errorLocationToTracingAttributes(error.errorInfo?.location),
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Retrieve error-type specific information
|
|
119
|
+
*/
|
|
120
|
+
export const getTypeInfo = function ({ type }) {
|
|
121
|
+
const typeA = TYPES[type] === undefined ? DEFAULT_TYPE : type;
|
|
122
|
+
return { type: typeA, ...TYPES[typeA] };
|
|
123
|
+
};
|
|
124
|
+
const ErrorTypeMap = {
|
|
125
|
+
/**
|
|
126
|
+
* Plugin called `utils.build.cancelBuild()`
|
|
127
|
+
*/
|
|
128
|
+
cancelBuild: 'cancelBuild',
|
|
129
|
+
resolveConfig: 'resolveConfig',
|
|
130
|
+
dependencies: 'dependencies',
|
|
131
|
+
pluginInput: 'pluginInput',
|
|
132
|
+
pluginUnsupportedVersion: 'pluginUnsupportedVersion',
|
|
133
|
+
buildCommand: 'buildCommand',
|
|
134
|
+
functionsBundling: 'functionsBundling',
|
|
135
|
+
secretScanningFoundSecrets: 'secretScanningFoundSecrets',
|
|
136
|
+
failPlugin: 'failPlugin',
|
|
137
|
+
failBuild: 'failBuild',
|
|
138
|
+
pluginValidation: 'pluginValidation',
|
|
139
|
+
pluginInternal: 'pluginInternal',
|
|
140
|
+
ipc: 'ipc',
|
|
141
|
+
corePlugin: 'corePlugin',
|
|
142
|
+
coreStep: 'coreStep',
|
|
143
|
+
api: 'api',
|
|
144
|
+
exception: 'exception',
|
|
145
|
+
telemetry: 'telemetry',
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* List of error types, and their related properties
|
|
149
|
+
* New error types should be added to Bugsnag since we use it for automated
|
|
150
|
+
* monitoring (through its Slack integration). The steps in Bugsnag are:
|
|
151
|
+
* - Create a new bookmark. Try to re-use the search filter of an existing
|
|
152
|
+
* bookmark with a similar error type, but only changing the `errorClass`.
|
|
153
|
+
* Make sure to check the box "Share with my team".
|
|
154
|
+
* - Add the `errorClass` to the search filter of either the "All warnings" or
|
|
155
|
+
* "All errors" bookmark depending on whether we should get notified on Slack
|
|
156
|
+
* for new errors of that type. You must use the bookmark menu action "Update
|
|
157
|
+
* with current filters"
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
const TYPES = {
|
|
161
|
+
/**
|
|
162
|
+
* Plugin called `utils.build.cancelBuild()`
|
|
163
|
+
*/
|
|
164
|
+
cancelBuild: {
|
|
165
|
+
title: ({ location: { packageName } }) => `Build canceled by ${packageName}`,
|
|
166
|
+
stackType: 'stack',
|
|
167
|
+
locationType: 'buildFail',
|
|
168
|
+
severity: 'none',
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* User configuration error (`@netlify/config`, wrong Node.js version)
|
|
172
|
+
*/
|
|
173
|
+
resolveConfig: {
|
|
174
|
+
title: 'Configuration error',
|
|
175
|
+
stackType: 'none',
|
|
176
|
+
severity: 'info',
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Error while installing user packages (missing plugins, local plugins or functions dependencies)
|
|
180
|
+
*/
|
|
181
|
+
dependencies: {
|
|
182
|
+
title: 'Dependencies installation error',
|
|
183
|
+
stackType: 'none',
|
|
184
|
+
severity: 'info',
|
|
185
|
+
},
|
|
186
|
+
/**
|
|
187
|
+
* User misconfigured a plugin
|
|
188
|
+
*/
|
|
189
|
+
pluginInput: {
|
|
190
|
+
title: ({ location: { packageName, input } }) => `Plugin "${packageName}" invalid input "${input}"`,
|
|
191
|
+
stackType: 'none',
|
|
192
|
+
locationType: 'buildFail',
|
|
193
|
+
severity: 'info',
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* User package.json sets an unsupported plugin version
|
|
197
|
+
*/
|
|
198
|
+
pluginUnsupportedVersion: {
|
|
199
|
+
title: 'Unsupported plugin version detected',
|
|
200
|
+
stackType: 'none',
|
|
201
|
+
severity: 'info',
|
|
202
|
+
},
|
|
203
|
+
/**
|
|
204
|
+
* `build.command` non-0 exit code
|
|
205
|
+
*/
|
|
206
|
+
buildCommand: {
|
|
207
|
+
title: '"build.command" failed',
|
|
208
|
+
group: ({ location: { buildCommand } }) => buildCommand,
|
|
209
|
+
stackType: 'message',
|
|
210
|
+
locationType: 'buildCommand',
|
|
211
|
+
severity: 'info',
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* User error during Functions bundling
|
|
215
|
+
*/
|
|
216
|
+
functionsBundling: {
|
|
217
|
+
title: ({ location: { functionName, functionType } }) => {
|
|
218
|
+
if (functionType === 'edge') {
|
|
219
|
+
return 'Bundling of edge function failed';
|
|
220
|
+
}
|
|
221
|
+
return `Bundling of function "${functionName}" failed`;
|
|
222
|
+
},
|
|
223
|
+
group: ({ location: { functionType = 'serverless' } }) => `Bundling of ${functionType} function failed`,
|
|
224
|
+
stackType: 'none',
|
|
225
|
+
locationType: 'functionsBundling',
|
|
226
|
+
severity: 'info',
|
|
227
|
+
},
|
|
228
|
+
/**
|
|
229
|
+
* Error from the secret scanning core step
|
|
230
|
+
*/
|
|
231
|
+
secretScanningFoundSecrets: {
|
|
232
|
+
title: 'Secrets scanning detected secrets in files during build.',
|
|
233
|
+
stackType: 'none',
|
|
234
|
+
severity: 'info',
|
|
235
|
+
},
|
|
236
|
+
/**
|
|
237
|
+
* Plugin called `utils.build.failBuild()`
|
|
238
|
+
*/
|
|
239
|
+
failBuild: {
|
|
240
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" failed`,
|
|
241
|
+
stackType: 'stack',
|
|
242
|
+
locationType: 'buildFail',
|
|
243
|
+
severity: 'info',
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* Plugin called `utils.build.failPlugin()`
|
|
247
|
+
*/
|
|
248
|
+
failPlugin: {
|
|
249
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" failed`,
|
|
250
|
+
stackType: 'stack',
|
|
251
|
+
locationType: 'buildFail',
|
|
252
|
+
severity: 'info',
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* Plugin has an invalid shape
|
|
256
|
+
*/
|
|
257
|
+
pluginValidation: {
|
|
258
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
259
|
+
stackType: 'stack',
|
|
260
|
+
locationType: 'buildFail',
|
|
261
|
+
severity: 'warning',
|
|
262
|
+
},
|
|
263
|
+
/**
|
|
264
|
+
* Plugin threw an uncaught exception
|
|
265
|
+
*/
|
|
266
|
+
pluginInternal: {
|
|
267
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
268
|
+
stackType: 'stack',
|
|
269
|
+
showErrorProps: true,
|
|
270
|
+
rawStack: true,
|
|
271
|
+
locationType: 'buildFail',
|
|
272
|
+
severity: 'warning',
|
|
273
|
+
},
|
|
274
|
+
/**
|
|
275
|
+
* Bug while orchestrating child processes
|
|
276
|
+
*/
|
|
277
|
+
ipc: {
|
|
278
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
279
|
+
stackType: 'none',
|
|
280
|
+
locationType: 'buildFail',
|
|
281
|
+
severity: 'warning',
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* Core plugin internal error
|
|
285
|
+
*/
|
|
286
|
+
corePlugin: {
|
|
287
|
+
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
288
|
+
stackType: 'stack',
|
|
289
|
+
showErrorProps: true,
|
|
290
|
+
rawStack: true,
|
|
291
|
+
locationType: 'buildFail',
|
|
292
|
+
severity: 'error',
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
* Core step internal error
|
|
296
|
+
*/
|
|
297
|
+
coreStep: {
|
|
298
|
+
title: ({ location: { coreStepName } }) => `Internal error during "${coreStepName}"`,
|
|
299
|
+
stackType: 'stack',
|
|
300
|
+
showErrorProps: true,
|
|
301
|
+
rawStack: true,
|
|
302
|
+
locationType: 'coreStep',
|
|
303
|
+
severity: 'error',
|
|
304
|
+
},
|
|
305
|
+
/**
|
|
306
|
+
* Request error when `@netlify/build` was calling Netlify API
|
|
307
|
+
*/
|
|
308
|
+
api: {
|
|
309
|
+
title: ({ location: { endpoint } }) => `API error on "${endpoint}"`,
|
|
310
|
+
stackType: 'message',
|
|
311
|
+
showErrorProps: true,
|
|
312
|
+
locationType: 'api',
|
|
313
|
+
severity: 'error',
|
|
314
|
+
},
|
|
315
|
+
/**
|
|
316
|
+
* `@netlify/build` threw an uncaught exception
|
|
317
|
+
*/
|
|
318
|
+
exception: {
|
|
319
|
+
title: 'Core internal error',
|
|
320
|
+
stackType: 'stack',
|
|
321
|
+
showErrorProps: true,
|
|
322
|
+
rawStack: true,
|
|
323
|
+
severity: 'error',
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Errors related with the telemetry output
|
|
327
|
+
*/
|
|
328
|
+
telemetry: {
|
|
329
|
+
showInBuildLog: false,
|
|
330
|
+
title: 'Telemetry error',
|
|
331
|
+
stackType: 'stack',
|
|
332
|
+
showErrorProps: true,
|
|
333
|
+
rawStack: true,
|
|
334
|
+
severity: 'error',
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
// When no error type matches, it's an uncaught exception, i.e. a bug
|
|
338
|
+
const DEFAULT_TYPE = 'exception';
|
|
@@ -93,5 +93,5 @@ export const logSecretsScanFailBuildMessage = function ({ logs, scanResults, gro
|
|
|
93
93
|
});
|
|
94
94
|
logError(logs, `\nTo prevent exposing secrets, the build will fail until these secret values are not found in build output or repo files.`);
|
|
95
95
|
logError(logs, `If these are expected, use SECRETS_SCAN_OMIT_PATHS, SECRETS_SCAN_OMIT_KEYS, or SECRETS_SCAN_ENABLED to prevent detecting.`);
|
|
96
|
-
logError(logs, `
|
|
96
|
+
logError(logs, `For more information on secrets scanning, see the Netlify Docs: https://ntl.fyi/configure-secrets-scanning`);
|
|
97
97
|
};
|
package/lib/tracing/main.js
CHANGED
|
@@ -4,6 +4,7 @@ import { context, trace, propagation, SpanStatusCode, diag, DiagLogLevel } from
|
|
|
4
4
|
import { parseKeyPairsIntoRecord } from '@opentelemetry/core/build/src/baggage/utils.js';
|
|
5
5
|
import { isBuildError } from '../error/info.js';
|
|
6
6
|
import { parseErrorInfo } from '../error/parse/parse.js';
|
|
7
|
+
import { buildErrorToTracingAttributes } from '../error/types.js';
|
|
7
8
|
import { ROOT_PACKAGE_JSON } from '../utils/json.js';
|
|
8
9
|
let sdk;
|
|
9
10
|
/** Given a simple logging function return a `DiagLogger`. Used to setup our system logger as the diag logger.*/
|
|
@@ -82,10 +83,10 @@ export const addErrorToActiveSpan = function (error) {
|
|
|
82
83
|
if (!span)
|
|
83
84
|
return;
|
|
84
85
|
if (isBuildError(error)) {
|
|
85
|
-
const
|
|
86
|
-
if (severity == 'none')
|
|
86
|
+
const buildError = parseErrorInfo(error);
|
|
87
|
+
if (buildError.severity == 'none')
|
|
87
88
|
return;
|
|
88
|
-
span.setAttributes(
|
|
89
|
+
span.setAttributes(buildErrorToTracingAttributes(buildError));
|
|
89
90
|
}
|
|
90
91
|
span.recordException(error);
|
|
91
92
|
span.setStatus({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.26.
|
|
3
|
+
"version": "29.26.4",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"engines": {
|
|
147
147
|
"node": "^14.16.0 || >=16.0.0"
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "7b23feab14bc8f97de9a9aa1133782a8319b3731"
|
|
150
150
|
}
|
package/lib/error/type.d.ts
DELETED
package/lib/error/type.js
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
// Retrieve error-type specific information
|
|
2
|
-
export const getTypeInfo = function ({ type }) {
|
|
3
|
-
const typeA = TYPES[type] === undefined ? DEFAULT_TYPE : type;
|
|
4
|
-
return { type: typeA, ...TYPES[typeA] };
|
|
5
|
-
};
|
|
6
|
-
// List of error types, and their related properties
|
|
7
|
-
// Related to build error logs:
|
|
8
|
-
// - `showInBuildLog`: `true` when we want this error to show in build logs (defaults to true)
|
|
9
|
-
// - `title`: main title shown in build error logs and in the UI (statuses)
|
|
10
|
-
// - `locationType`: retrieve a human-friendly location of the error, printed
|
|
11
|
-
// in build error logs
|
|
12
|
-
// - `showErrorProps`: `true` when the `Error` instance static properties
|
|
13
|
-
// should be printed in build error logs. Only useful when the `Error`
|
|
14
|
-
// instance was not created by us.
|
|
15
|
-
// - `rawStack`: `true` when the stack trace should be cleaned up
|
|
16
|
-
// - `stackType`: how the stack trace should appear in build error logs:
|
|
17
|
-
// - `none`: not printed
|
|
18
|
-
// - `stack`: printed as is
|
|
19
|
-
// - `message`: printed as is, but taken from `error.message`.
|
|
20
|
-
// Used when `error.stack` is not being correct due to the error being
|
|
21
|
-
// passed between different processes.
|
|
22
|
-
// - `severity`: error severity (also used by Bugsnag):
|
|
23
|
-
// - `success`: build success
|
|
24
|
-
// - `none`: not an error, e.g. build cancellation
|
|
25
|
-
// - `info`: user error
|
|
26
|
-
// - `warning`: community plugin error
|
|
27
|
-
// - `error`: system error, including core plugin error
|
|
28
|
-
// Related to Bugsnag:
|
|
29
|
-
// - `group`: main title shown in Bugsnag. Also used to group errors together
|
|
30
|
-
// in Bugsnag, combined with `error.message`.
|
|
31
|
-
// Defaults to `title`.
|
|
32
|
-
// New error types should be added to Bugsnag since we use it for automated
|
|
33
|
-
// monitoring (through its Slack integration). The steps in Bugsnag are:
|
|
34
|
-
// - Create a new bookmark. Try to re-use the search filter of an existing
|
|
35
|
-
// bookmark with a similar error type, but only changing the `errorClass`.
|
|
36
|
-
// Make sure to check the box "Share with my team".
|
|
37
|
-
// - Add the `errorClass` to the search filter of either the "All warnings" or
|
|
38
|
-
// "All errors" bookmark depending on whether we should get notified on Slack
|
|
39
|
-
// for new errors of that type. You must use the bookmark menu action "Update
|
|
40
|
-
// with current filters"
|
|
41
|
-
const TYPES = {
|
|
42
|
-
// Plugin called `utils.build.cancelBuild()`
|
|
43
|
-
cancelBuild: {
|
|
44
|
-
title: ({ location: { packageName } }) => `Build canceled by ${packageName}`,
|
|
45
|
-
stackType: 'stack',
|
|
46
|
-
locationType: 'buildFail',
|
|
47
|
-
severity: 'none',
|
|
48
|
-
},
|
|
49
|
-
// User configuration error (`@netlify/config`, wrong Node.js version)
|
|
50
|
-
resolveConfig: {
|
|
51
|
-
title: 'Configuration error',
|
|
52
|
-
stackType: 'none',
|
|
53
|
-
severity: 'info',
|
|
54
|
-
},
|
|
55
|
-
// Error while installing user packages (missing plugins, local plugins or functions dependencies)
|
|
56
|
-
dependencies: {
|
|
57
|
-
title: 'Dependencies installation error',
|
|
58
|
-
stackType: 'none',
|
|
59
|
-
severity: 'info',
|
|
60
|
-
},
|
|
61
|
-
// User misconfigured a plugin
|
|
62
|
-
pluginInput: {
|
|
63
|
-
title: ({ location: { packageName, input } }) => `Plugin "${packageName}" invalid input "${input}"`,
|
|
64
|
-
stackType: 'none',
|
|
65
|
-
locationType: 'buildFail',
|
|
66
|
-
severity: 'info',
|
|
67
|
-
},
|
|
68
|
-
// User package.json sets an unsupported plugin version
|
|
69
|
-
pluginUnsupportedVersion: {
|
|
70
|
-
title: 'Unsupported plugin version detected',
|
|
71
|
-
stackType: 'none',
|
|
72
|
-
severity: 'info',
|
|
73
|
-
},
|
|
74
|
-
// `build.command` non-0 exit code
|
|
75
|
-
buildCommand: {
|
|
76
|
-
title: '"build.command" failed',
|
|
77
|
-
group: ({ location: { buildCommand } }) => buildCommand,
|
|
78
|
-
stackType: 'message',
|
|
79
|
-
locationType: 'buildCommand',
|
|
80
|
-
severity: 'info',
|
|
81
|
-
},
|
|
82
|
-
// User error during Functions bundling
|
|
83
|
-
functionsBundling: {
|
|
84
|
-
title: ({ location: { functionName, functionType } }) => {
|
|
85
|
-
if (functionType === 'edge') {
|
|
86
|
-
return 'Bundling of edge function failed';
|
|
87
|
-
}
|
|
88
|
-
return `Bundling of function "${functionName}" failed`;
|
|
89
|
-
},
|
|
90
|
-
group: ({ location: { functionType = 'serverless' } }) => `Bundling of ${functionType} function failed`,
|
|
91
|
-
stackType: 'none',
|
|
92
|
-
locationType: 'functionsBundling',
|
|
93
|
-
severity: 'info',
|
|
94
|
-
},
|
|
95
|
-
secretScanningFoundSecrets: {
|
|
96
|
-
title: 'Secrets scanning detected secrets in files during build.',
|
|
97
|
-
stackType: 'none',
|
|
98
|
-
severity: 'info',
|
|
99
|
-
},
|
|
100
|
-
// Plugin called `utils.build.failBuild()`
|
|
101
|
-
failBuild: {
|
|
102
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" failed`,
|
|
103
|
-
stackType: 'stack',
|
|
104
|
-
locationType: 'buildFail',
|
|
105
|
-
severity: 'info',
|
|
106
|
-
},
|
|
107
|
-
// Plugin called `utils.build.failPlugin()`
|
|
108
|
-
failPlugin: {
|
|
109
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" failed`,
|
|
110
|
-
stackType: 'stack',
|
|
111
|
-
locationType: 'buildFail',
|
|
112
|
-
severity: 'info',
|
|
113
|
-
},
|
|
114
|
-
// Plugin has an invalid shape
|
|
115
|
-
pluginValidation: {
|
|
116
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
117
|
-
stackType: 'stack',
|
|
118
|
-
locationType: 'buildFail',
|
|
119
|
-
severity: 'warning',
|
|
120
|
-
},
|
|
121
|
-
// Plugin threw an uncaught exception
|
|
122
|
-
pluginInternal: {
|
|
123
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
124
|
-
stackType: 'stack',
|
|
125
|
-
showErrorProps: true,
|
|
126
|
-
rawStack: true,
|
|
127
|
-
locationType: 'buildFail',
|
|
128
|
-
severity: 'warning',
|
|
129
|
-
},
|
|
130
|
-
// Bug while orchestrating child processes
|
|
131
|
-
ipc: {
|
|
132
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
133
|
-
stackType: 'none',
|
|
134
|
-
locationType: 'buildFail',
|
|
135
|
-
severity: 'warning',
|
|
136
|
-
},
|
|
137
|
-
// Core plugin internal error
|
|
138
|
-
corePlugin: {
|
|
139
|
-
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
140
|
-
stackType: 'stack',
|
|
141
|
-
showErrorProps: true,
|
|
142
|
-
rawStack: true,
|
|
143
|
-
locationType: 'buildFail',
|
|
144
|
-
severity: 'error',
|
|
145
|
-
},
|
|
146
|
-
// Core step internal error
|
|
147
|
-
coreStep: {
|
|
148
|
-
title: ({ location: { coreStepName } }) => `Internal error during "${coreStepName}"`,
|
|
149
|
-
stackType: 'stack',
|
|
150
|
-
showErrorProps: true,
|
|
151
|
-
rawStack: true,
|
|
152
|
-
locationType: 'coreStep',
|
|
153
|
-
severity: 'error',
|
|
154
|
-
},
|
|
155
|
-
// Request error when `@netlify/build` was calling Netlify API
|
|
156
|
-
api: {
|
|
157
|
-
title: ({ location: { endpoint } }) => `API error on "${endpoint}"`,
|
|
158
|
-
stackType: 'message',
|
|
159
|
-
showErrorProps: true,
|
|
160
|
-
locationType: 'api',
|
|
161
|
-
severity: 'error',
|
|
162
|
-
},
|
|
163
|
-
// `@netlify/build` threw an uncaught exception
|
|
164
|
-
exception: {
|
|
165
|
-
title: 'Core internal error',
|
|
166
|
-
stackType: 'stack',
|
|
167
|
-
showErrorProps: true,
|
|
168
|
-
rawStack: true,
|
|
169
|
-
severity: 'error',
|
|
170
|
-
},
|
|
171
|
-
// Errors related with the telemetry output
|
|
172
|
-
telemetry: {
|
|
173
|
-
showInBuildLog: false,
|
|
174
|
-
title: 'Telemetry error',
|
|
175
|
-
stackType: 'stack',
|
|
176
|
-
showErrorProps: true,
|
|
177
|
-
rawStack: true,
|
|
178
|
-
severity: 'error',
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
// When no error type matches, it's an uncaught exception, i.e. a bug
|
|
182
|
-
const DEFAULT_TYPE = 'exception';
|