improve log message for registering new type in db (#19868)

(cherry picked from commit 9c59f8123403763c196e9dd22ed4a3d5d5b69893)
This commit is contained in:
sonika-shah 2025-02-19 10:51:02 +05:30 committed by OpenMetadata Release Bot
parent a66167e37b
commit a1976ff97a
2 changed files with 6 additions and 2 deletions

View File

@ -74,7 +74,9 @@ public class TypeRegistry {
type.setCustomProperties(storedType.getCustomProperties());
}
} catch (Exception e) {
LOG.error("Creating entity that does not exist ", e);
LOG.debug(
"Type '{}' not found. Proceeding to add new type entity in database.",
type.getName());
}
repository.addToRegistry(type);
} catch (Exception e) {

View File

@ -118,7 +118,9 @@ public class TypeResource extends EntityResource<Type, TypeRepository> {
type.setCustomProperties(storedType.getCustomProperties());
}
} catch (Exception e) {
LOG.error("Creating entity that does not exist ", e);
LOG.debug(
"Type '{}' not found. Proceeding to add new type entity in database.",
type.getName());
}
this.repository.createOrUpdate(null, type);
this.repository.addToRegistry(type);