Skip to content

Comments

Show detailed Gemini API error messages in Discord responses (#4)#231

Merged
devth merged 1 commit intoyetibot:masterfrom
saada:master
Feb 14, 2026
Merged

Show detailed Gemini API error messages in Discord responses (#4)#231
devth merged 1 commit intoyetibot:masterfrom
saada:master

Conversation

@saada
Copy link
Contributor

@saada saada commented Feb 14, 2026

Previously, Gemini API errors were swallowed by clj-http's throw-exceptions behavior, resulting in generic messages like "clj-http: status 400" shown to users. Now generate-image uses throw-exceptions false and extracts the actual error message from the Gemini response body (e.g. quota exceeded, invalid argument, content policy violations). Also detects safety-blocked responses and reports the specific block reason instead of a generic "no image was generated" message.

https://claude.ai/code/session_01Q6mnkmURXCy91TqwGgqSWV

Previously, Gemini API errors were swallowed by clj-http's throw-exceptions
behavior, resulting in generic messages like "clj-http: status 400" shown
to users. Now generate-image uses throw-exceptions false and extracts the
actual error message from the Gemini response body (e.g. quota exceeded,
invalid argument, content policy violations). Also detects safety-blocked
responses and reports the specific block reason instead of a generic
"no image was generated" message.

https://claude.ai/code/session_01Q6mnkmURXCy91TqwGgqSWV

Co-authored-by: Claude <noreply@anthropic.com>
@saada saada requested a review from devth as a code owner February 14, 2026 13:05
Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@devth devth merged commit cc1b967 into yetibot:master Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants