Skip to content

Commit 11861a2

Browse files
committed
Handle missing Jira issue
1 parent ae3eb69 commit 11861a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

confluence_markdown_exporter/confluence.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,12 @@ def convert_jira_issue(self, el: BeautifulSoup, text: str, parent_tags: list[str
595595
return self.process_tag(link, parent_tags)
596596
if not link:
597597
return text
598-
issue = JiraIssue.from_key(str(issue_key))
599-
return f"[[{issue.key}] {issue.summary}]({link.get('href')})"
598+
599+
try:
600+
issue = JiraIssue.from_key(str(issue_key))
601+
return f"[[{issue.key}] {issue.summary}]({link.get('href')})"
602+
except HTTPError:
603+
return f"[[{issue_key}]]({link.get('href')})"
600604

601605
def convert_pre(self, el: BeautifulSoup, text: str, parent_tags: list[str]) -> str:
602606
if not text:

0 commit comments

Comments
 (0)