Skip to content

Commit 9f0ad64

Browse files
zzstoatzzclaude
andauthored
fix github label validation and error handling (#1235)
**github labels fix:** - allow None for label description field (github api returns null sometimes) - fixes pydantic validation error when fetching issues with labels **error handling fix:** - remove ERROR_HANDLED completed state - errors now properly fail the flow after sending user-friendly message - maintains user experience while allowing proper monitoring/alerting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9715714 commit 9f0ad64

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

examples/slackbot/src/slackbot/api.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,7 @@ async def handle_message(payload: SlackPayload, db: Database):
279279
channel_id=event.channel,
280280
thread_ts=thread_ts,
281281
)
282-
# Still return completed so we don't retry
283-
return Completed(
284-
message="Error during agent execution",
285-
name="ERROR_HANDLED",
286-
data=dict(error=str(e), user_context=user_context),
287-
)
282+
raise
288283
finally:
289284
try:
290285
await mark_thread_completed(db, message_ts)

examples/slackbot/src/slackbot/github/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class GitHubLabel(BaseModel):
1818

1919
name: str = Field(default="")
2020
color: str = Field(default="")
21-
description: str = Field(default="")
21+
description: str | None = Field(default="")
2222

2323

2424
class GitHubComment(BaseModel):

0 commit comments

Comments
 (0)