File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
libs/backend-apisix-standalone/src Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ export class Operator extends ADCSDK.backend.BackendEventSource {
120120 ADCSDK . BackendSyncResult ,
121121 ObservableInput < ADCSDK . BackendSyncResult >
122122 > ( ( error : Error | AxiosError ) => {
123+ // Log the error response when error
124+ if ( axios . isAxiosError ( error ) && error . response )
125+ logger ( this . debugLogEvent ( error . response ) ) ;
126+
123127 if ( opts . exitOnFailure ) {
124128 if ( axios . isAxiosError ( error ) && error . response )
125129 return throwError (
@@ -144,9 +148,11 @@ export class Operator extends ADCSDK.backend.BackendEventSource {
144148 server,
145149 } satisfies ADCSDK . BackendSyncResult ) ;
146150 } ) ,
147- tap ( ( ) => {
148- configCache . set ( this . opts . cacheKey , toADC ( newConfig ) ) ;
149- rawConfigCache . set ( this . opts . cacheKey , newConfig ) ;
151+ tap ( ( res ) => {
152+ if ( res . success ) {
153+ configCache . set ( this . opts . cacheKey , toADC ( newConfig ) ) ;
154+ rawConfigCache . set ( this . opts . cacheKey , newConfig ) ;
155+ }
150156 logger ( taskStateEvent ( 'TASK_DONE' ) ) ;
151157 } ) ,
152158 ) ,
You can’t perform that action at this time.
0 commit comments