File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,11 @@ export interface ErrorConfig {
1616
1717export interface ErrorInfo {
1818 message : string ;
19+ name : string ;
20+ time_thrown : string ;
21+ data ?: object ;
1922 path ?: string ;
2023 locations ?: any ;
21- extensions ?: {
22- name : string ;
23- time_thrown : string ;
24- data ?: object ;
25- } ;
2624}
2725
2826export class ApolloError extends ExtendableError {
@@ -64,13 +62,11 @@ export class ApolloError extends ExtendableError {
6462
6563 let error : ErrorInfo = {
6664 message,
65+ name,
66+ time_thrown,
67+ data,
6768 path,
68- locations,
69- extensions : {
70- name,
71- time_thrown,
72- data
73- }
69+ locations
7470 } ;
7571
7672 if ( _showLocations ) {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ describe('createError', () => {
3131 } ,
3232 } ) ;
3333
34- const { message, extensions : { name, time_thrown, data } } = e . serialize ( ) ;
34+ const { message, name, time_thrown, data } = e . serialize ( ) ;
3535 expect ( message ) . to . equal ( 'A foo 2.0 error has occurred' ) ;
3636 expect ( name ) . to . equal ( 'FooError' ) ;
3737 expect ( time_thrown ) . to . equal ( e . time_thrown ) ;
You can’t perform that action at this time.
0 commit comments