File tree Expand file tree Collapse file tree
views/panel/backend/message-handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,13 +116,14 @@ export class ApiManager {
116116 message : 'API call cancelled by user'
117117 } )
118118 throw error
119+ } else {
120+ Logger . error ( {
121+ function_name : 'get' ,
122+ message : 'API call error' ,
123+ data : error
124+ } )
119125 }
120126
121- Logger . error ( {
122- function_name : 'get' ,
123- message : 'API call error' ,
124- data : error
125- } )
126127 return null
127128 } finally {
128129 // Unblock anyone waiting for this request if it was the one in the chain
Original file line number Diff line number Diff line change @@ -438,6 +438,7 @@ export const handle_edit_context = async (
438438 ]
439439
440440 let error_occurred = false
441+ let was_cancelled = false
441442
442443 const promises = Array . from ( { length : message . invocation_count } ) . map (
443444 async ( ) => {
@@ -472,7 +473,10 @@ export const handle_edit_context = async (
472473 return true
473474 }
474475 } catch ( error ) {
475- if ( axios . isCancel ( error ) ) return false
476+ if ( axios . isCancel ( error ) ) {
477+ was_cancelled = true
478+ return false
479+ }
476480 Logger . error ( {
477481 function_name : 'handle_edit_context' ,
478482 message : 'edit context task error' ,
@@ -492,7 +496,7 @@ export const handle_edit_context = async (
492496
493497 const results = await Promise . all ( promises )
494498
495- if ( error_occurred ) return
499+ if ( error_occurred || was_cancelled ) return
496500
497501 if ( results . some ( ( r ) => r ) ) {
498502 return
You can’t perform that action at this time.
0 commit comments