@@ -234,7 +234,7 @@ def _call_api(
234
234
235
235
return None
236
236
else :
237
- with contextlib .suppress (ValueError ):
237
+ with contextlib .suppress (ValueError , json . decoder . JSONDecodeError ):
238
238
error_info = json .loads (response .text )
239
239
error_code = error_info .get ("errorCode" , 0 )
240
240
error_message = error_info .get ("errorMessage" , "" )
@@ -497,9 +497,11 @@ def create_typedef(self, typedef: TypeDef) -> TypeDefResponse:
497
497
)
498
498
if isinstance (typedef , ClassificationDef ):
499
499
from pyatlan .cache .classification_cache import ClassificationCache
500
+
500
501
ClassificationCache .refresh_cache ()
501
502
if isinstance (typedef , CustomMetadataDef ):
502
503
from pyatlan .cache .custom_metadata_cache import CustomMetadataCache
504
+
503
505
CustomMetadataCache .refresh_cache ()
504
506
return TypeDefResponse (** raw_json )
505
507
@@ -509,6 +511,7 @@ def purge_typedef(self, internal_name: str) -> None:
509
511
# to refresh that particular cache
510
512
from pyatlan .cache .classification_cache import ClassificationCache
511
513
from pyatlan .cache .custom_metadata_cache import CustomMetadataCache
514
+
512
515
ClassificationCache .refresh_cache ()
513
516
CustomMetadataCache .refresh_cache ()
514
517
0 commit comments