镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add more robust error messaging #80

Open

Description

@MAsuamah

Feedback from a customer:

In the typescript sdk when assembly.transcripts.submit returns an error it's just a string. Is there a way to tell if it's retriable or not (ie if there's a status code)?

E.g. differentiating between a bad file submitted on our end (where sending our request again wouldn't fix anything) vs an internal assembly error / throttling / etc (where we could presumably just try the same request again later)

Activity

  1. kosesena commented on Sep 29, 2026

    @kosesena
    Contributor

    I'd like to pick this up. Proposal: add an AssemblyAIError (extends Error, same message as today) with status and retryAfter (from Retry-After on 429/503), following the existing SyncTranscriptError, and throw it from the three throw new Error(...) sites in BaseService.fetch. Callers that only read message keep working; callers can then retry on status >= 500 || status === 429. Tests for the JSON-error, plain-text and empty-body cases. Does that match what you'd want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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