feat: expose Gemini RetryInfo retry_delay() on VertexApiError and Error (#19) #20

Merged
andreban merged 2 commits from feat/retry-delay into main 2026-10-28 08:48:51 +00:00

2 Commits

Author SHA1 Message Date
a49d37f03d refactor: address review feedback on retry_delay (#19)
All checks were successful
Rust / check (pull_request) Successful in 2m42s
- Drop the unreachable checked_mul in parse_duration; a fraction of at
  most 9 digits scaled to nanoseconds always fits in a u32.
- Share a vertex_error test helper in error.rs instead of building
  VertexApiError inline.
- Bump version to 0.2.0 for the breaking VertexApiError.details change.
2026-10-28 08:44:53 +00:00
cecc14d31e feat: expose Gemini RetryInfo retry_delay() on VertexApiError and Error (#19)
All checks were successful
Rust / check (pull_request) Successful in 2m40s
VertexApiError.details is now Option<Vec<serde_json::Value>> so that
unknown google.rpc.* detail types (e.g. RetryInfo, QuotaFailure) no
longer break deserialization and fall back to Error::HttpStatus. The
unused ErrorType, ErrorInfoMetadata, FieldViolation and Link types are
removed.

Add VertexApiError::retry_delay() which parses the protobuf duration in a
google.rpc.RetryInfo entry, and Error::retry_delay() which delegates to it.

Closes #19
2026-10-28 08:38:02 +00:00