feat(api-nodes, pylint): use lazy formatting in logging functions (#10248)
This commit is contained in:
@@ -296,7 +296,7 @@ def validate_video_result_response(response) -> None:
|
||||
"""Validates that the Kling task result contains a video."""
|
||||
if not is_valid_video_response(response):
|
||||
error_msg = f"Kling task {response.data.task_id} succeeded but no video data found in response."
|
||||
logging.error(f"Error: {error_msg}.\nResponse: {response}")
|
||||
logging.error("Error: %s.\nResponse: %s", error_msg, response)
|
||||
raise Exception(error_msg)
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ def validate_image_result_response(response) -> None:
|
||||
"""Validates that the Kling task result contains an image."""
|
||||
if not is_valid_image_response(response):
|
||||
error_msg = f"Kling task {response.data.task_id} succeeded but no image data found in response."
|
||||
logging.error(f"Error: {error_msg}.\nResponse: {response}")
|
||||
logging.error("Error: %s.\nResponse: %s", error_msg, response)
|
||||
raise Exception(error_msg)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user