File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export interface ErrorConfig {
8
8
message : string ;
9
9
time_thrown ?: string ;
10
10
data ?: object ;
11
+ internalData ?: object ;
11
12
options ?: {
12
13
showPath ?: boolean ;
13
14
showLocations ?: boolean ;
Original file line number Diff line number Diff line change @@ -137,4 +137,18 @@ describe('formatError', () => {
137
137
} ) ;
138
138
} ) ;
139
139
} ) ;
140
+ context ( 'error has internalData' , ( ) => {
141
+ it ( 'does not include the internalData property' , ( ) => {
142
+ const FooError = createError ( 'FooError' , {
143
+ message : 'A foo error has occurred' ,
144
+ internalData : {
145
+ secret : 'SQL ERROR'
146
+ }
147
+ } ) ;
148
+
149
+ const e = new FooError ( ) ;
150
+ const s = formatError ( e ) ;
151
+ expect ( s . internalData ) . to . eq ( undefined )
152
+ } )
153
+ } )
140
154
} ) ;
You can’t perform that action at this time.
0 commit comments