@@ -45,6 +45,9 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
45
45
target : `initializingData` ,
46
46
actions : [ `assignStoreAndWorkerPool` , `spawnMutationListener` ] ,
47
47
} ,
48
+ onError : {
49
+ actions : `panic` ,
50
+ } ,
48
51
} ,
49
52
} ,
50
53
// Sourcing nodes, customising and inferring schema, then running createPages
@@ -77,6 +80,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
77
80
] ,
78
81
target : `runningPostBootstrap` ,
79
82
} ,
83
+ onError : {
84
+ actions : `logError` ,
85
+ target : `waiting` ,
86
+ } ,
80
87
} ,
81
88
} ,
82
89
runningPostBootstrap : {
@@ -132,6 +139,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
132
139
target : `waiting` ,
133
140
} ,
134
141
] ,
142
+ onError : {
143
+ actions : `logError` ,
144
+ target : `waiting` ,
145
+ } ,
135
146
} ,
136
147
} ,
137
148
// Recompile the JS bundle
@@ -142,6 +153,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
142
153
actions : `markSourceFilesClean` ,
143
154
target : `waiting` ,
144
155
} ,
156
+ onError : {
157
+ actions : `logError` ,
158
+ target : `waiting` ,
159
+ } ,
145
160
} ,
146
161
} ,
147
162
// Spin up webpack and socket.io
@@ -156,6 +171,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
156
171
`markSourceFilesClean` ,
157
172
] ,
158
173
} ,
174
+ onError : {
175
+ actions : `panic` ,
176
+ target : `waiting` ,
177
+ } ,
159
178
} ,
160
179
} ,
161
180
// Idle, waiting for events that make us rebuild
@@ -189,6 +208,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
189
208
actions : `assignServiceResult` ,
190
209
target : `recreatingPages` ,
191
210
} ,
211
+ onError : {
212
+ actions : `panic` ,
213
+ target : `waiting` ,
214
+ } ,
192
215
} ,
193
216
} ,
194
217
// Almost the same as initializing data, but skips various first-run stuff
@@ -223,6 +246,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
223
246
] ,
224
247
target : `runningQueries` ,
225
248
} ,
249
+ onError : {
250
+ actions : `logError` ,
251
+ target : `waiting` ,
252
+ } ,
226
253
} ,
227
254
} ,
228
255
// Rebuild pages if a node has been mutated outside of sourceNodes
@@ -236,6 +263,10 @@ const developConfig: MachineConfig<IBuildContext, any, AnyEventObject> = {
236
263
actions : `assignServiceResult` ,
237
264
target : `runningQueries` ,
238
265
} ,
266
+ onError : {
267
+ actions : `logError` ,
268
+ target : `waiting` ,
269
+ } ,
239
270
} ,
240
271
} ,
241
272
} ,
0 commit comments