UPDATE: improve logging for table metadata

This commit is contained in:
Rafael
2025-02-20 08:40:48 -03:00
parent 831a03402e
commit f48a35c7ce
+2 -2
View File
@@ -440,7 +440,7 @@ class CatalogService implements OnModuleInit {
this.logger.info(`Creating table metadata for table ${body.table_metadata.table_name}`, {...body.logMetadata});
this.logger.info(`Using endpoint: ${endpoint}`, {...body.logMetadata});
this.logger.debug(`Payload: ${JSON.stringify(body.table_metadata)}`, {...body.logMetadata});
this.logger.debug(`Payload: ${JSON.stringify(body.table_metadata)}`, {...body.logMetadata});
try {
const { data, status } = await axios.post(endpoint, {...body.table_metadata});
@@ -454,7 +454,7 @@ class CatalogService implements OnModuleInit {
this.logger.error(
`Failed to create table metadata for table ${body.table_metadata.table_name} failed with status ${
error.response?.status
} because of ${error.response?.data || error.message}`, {...body.logMetadata});
} because of ${JSON.stringify(error.response?.data) || error.message}`, {...body.logMetadata});
throw new Error(error.response?.data?.message || error.message);
}
}