Skip to content

Commit d117b48

Browse files
committed
Update failed posts function
1 parent 2ee6ec6 commit d117b48

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/murfey/cli/repost_failed_calls.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,13 @@ def handle_failed_posts(messages_path: list[Path], murfey_db: Session):
115115
)
116116
continue
117117

118-
function_to_call = getattr(
119-
getattr(murfey.server.api, router_base), function_name
120-
)
118+
try:
119+
function_to_call = getattr(
120+
getattr(murfey.server.api, router_base), function_name
121+
)
122+
except AttributeError:
123+
print(f"Cannot repost {json_file} as {function_name} does not exist")
124+
continue
121125
expected_args = getfullargspec(function_to_call).args
122126

123127
call_kwargs = message.get("kwargs", {})

0 commit comments

Comments
 (0)