File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,11 @@ func (tfE customError) Error() error {
184184
185185func handleMissingResourceError (sync ResourceVoider , err * error ) {
186186
187+ if isCircuitBreakerOpen (* err ) {
188+ log .Printf ("[DEBUG] the circuit breaker is in the open state, error triggering the circuit breaker is \n %s\n " , * err )
189+ return
190+ }
191+
187192 if err != nil {
188193 // patch till OCE service returns correct error response code for invalid auth token
189194 if strings .Contains ((* err ).Error (), "IDCS token validation has failed" ) {
@@ -198,7 +203,9 @@ func handleMissingResourceError(sync ResourceVoider, err *error) {
198203 log .Println ("[DEBUG] Object does not exist, voiding resource and nullifying error" )
199204 if sync != nil {
200205 sync .VoidState ()
206+ log .Println ("[DEBUG] the response contains an error, but ignoring it and voiding state" )
201207 }
208+ log .Printf ("[DEBUG] the ignored error is\n %s\n " , * err )
202209 * err = nil
203210 }
204211 }
@@ -309,3 +316,7 @@ func getVersionAndDateErrorImpl(version string, date string) string {
309316 }
310317 return result
311318}
319+
320+ func isCircuitBreakerOpen (err error ) bool {
321+ return oci_common .IsCircuitBreakerError (err )
322+ }
You can’t perform that action at this time.
0 commit comments