Skip to content

better UX for Anthropic (or insert upstream $model_provider) API request errors #204

@banksean

Description

@banksean

I see this "..." chat bubble in the messages view, and it's just been sitting there like this for quite a while:
Image

When I check the logs, I can see that there was a 500 response from Anthropic with the message, "anthropic request sleep before retry"

{"time":"2025-07-17T20:59:51.708287224Z","level":"WARN","msg":"anthropic_request_failed","response":"{\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"}}","status_code":500,"session_id":"dg44-4nh5-tpnd-n1bn","convo_id":"304-pbzc"}
{"time":"2025-07-17T20:59:51.70839789Z","level":"WARN","msg":"anthropic request sleep before retry","sleep":30424530093,"attempts":1,"session_id":"dg44-4nh5-tpnd-n1bn","convo_id":"304-pbzc"}
{"time":"2025-07-17T21:00:32.613056177Z","level":"WARN","msg":"anthropic_request_failed","response":"{\"type\":\"error\",\"error\":{\"type\":\"api_error\",\"message\":\"Internal server error\"}}","status_code":500,"session_id":"dg44-4nh5-tpnd-n1bn","convo_id":"304-pbzc"}
{"time":"2025-07-17T21:00:32.613164469Z","level":"WARN","msg":"anthropic request sleep before retry","sleep":60848943001,"attempts":2,"session_id":"dg44-4nh5-tpnd-n1bn","convo_id":"304-pbzc"}

We should at least let the user know that Sketch got their message, but Sketch is having problems talking to Anthropic. Sketch will keep trying for some time, but the issue isn't due to Sketch itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions