File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,8 +180,15 @@ class AcpClient {
180180 callback ( true ) ;
181181
182182 if ( this . onEvaluate ) {
183- const job = this . _hydrateJob ( data ) ;
184- this . onEvaluate ( job ) ;
183+ try {
184+ const job = this . _hydrateJob ( data ) ;
185+ this . onEvaluate ( job ) ;
186+ } catch ( err ) {
187+ console . error (
188+ `Failed to hydrate job ${ data . id } in ON_EVALUATE:` ,
189+ err
190+ ) ;
191+ }
185192 }
186193 } ,
187194 ) ;
@@ -192,11 +199,18 @@ class AcpClient {
192199 callback ( true ) ;
193200
194201 if ( this . onNewTask ) {
195- const job = this . _hydrateJob ( data ) ;
196- this . onNewTask (
197- job ,
198- job . memos . find ( ( m ) => m . id == data . memoToSign ) ,
199- ) ;
202+ try {
203+ const job = this . _hydrateJob ( data ) ;
204+ this . onNewTask (
205+ job ,
206+ job . memos . find ( ( m ) => m . id == data . memoToSign ) ,
207+ ) ;
208+ } catch ( err ) {
209+ console . error (
210+ `Failed to hydrate job ${ data . id } in ON_NEW_TASK:` ,
211+ err
212+ ) ;
213+ }
200214 }
201215 } ,
202216 ) ;
You can’t perform that action at this time.
0 commit comments