Update logging levels and add error handling for empty data in PR tools and providers

This commit is contained in:
mrT23
2024-08-14 08:02:34 +03:00
parent 8adfca5b3c
commit 8414e109c5
5 changed files with 7 additions and 5 deletions

View File

@ -177,7 +177,7 @@ class AzureDevopsProvider(GitProvider):
pull_request_id=self.pr_num,
)
except Exception as e:
get_logger().exception(f"Failed to publish labels, error: {e}")
get_logger().warning(f"Failed to publish labels, error: {e}")
def get_pr_labels(self, update=False):
try:

View File

@ -736,7 +736,7 @@ class GithubProvider(GitProvider):
"PUT", f"{self.pr.issue_url}/labels", input=post_parameters
)
except Exception as e:
get_logger().exception(f"Failed to publish labels, error: {e}")
get_logger().warning(f"Failed to publish labels, error: {e}")
def get_pr_labels(self, update=False):
try:

View File

@ -508,7 +508,7 @@ class GitLabProvider(GitProvider):
self.mr.labels = list(set(pr_types))
self.mr.save()
except Exception as e:
get_logger().exception(f"Failed to publish labels, error: {e}")
get_logger().warning(f"Failed to publish labels, error: {e}")
def publish_inline_comments(self, comments: list[dict]):
pass