-
Notifications
You must be signed in to change notification settings - Fork 88
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Hello! I was using this library with the Vertex AI backend and ran into occasional 500 / INTERNAL
errors that manifest as:
iterateResponseStream: invalid stream chunk: { "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } }
AFAICT, these errors are being handled and re-surfaced as unstructured errors here:
Line 263 in 6194065
if !yield(nil, fmt.Errorf("iterateResponseStream: invalid stream chunk: %s:%s", string(prefix), string(data))) { |
Is there any reason that these aren't returned as structured APIError
s? That would make it possible for users of this library to retry on such errors.
Thanks!
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.