Skip to content

Commit

Permalink
Merge pull request #55 from jphacks/hotfix/lineapi_send_error
Browse files Browse the repository at this point in the history
add debug message
  • Loading branch information
motty-mio2 authored Nov 17, 2023
2 parents d2c1201 + 8636ede commit 698cccc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/kb_2315/backend/api/endpoints/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ async def handle_callback(request: Request) -> Literal["OK"]:
return_id = event_source.group_id # type: ignore
case "room":
return_id = event_source.room_id # type: ignore

if return_id is None:
continue
else:
print(f"Return ID : {return_id}")

if event.type == "postback":
pbdata: str = event.postback.data # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions src/kb_2315/notify/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def send_message(
messages=TextSendMessage(text=message),
)
except LineBotApiError as e:
print(f"LineBotApiError: {e}")
print(f"Send Message Error:\n{e}")


def shoe_select_carousel(send_to_id: str = conf.line_group_id, session_id: UUID | None = None) -> None:
Expand Down Expand Up @@ -56,4 +56,4 @@ def shoe_select_carousel(send_to_id: str = conf.line_group_id, session_id: UUID
messages=carousel_template_message,
)
except LineBotApiError as e:
print(f"LineBotApiError: {e}")
print(f"Select Shoe Carousel Error:\n{e}")

0 comments on commit 698cccc

Please sign in to comment.