Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ApiClientError #285

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Refactor ApiClientError #285

merged 1 commit into from
Mar 13, 2024

Conversation

zombieobject
Copy link
Contributor

Introduction 📟

ApiClientError has in the past been an enum. However, throwing the enum in an error catching context did not afford the ability to update the localized description.

Purpose ℹ️

Refactor ApiClientError from an Enum to a Struct which conforms to LocalizedError and GenericErrorDescribing. Conforming to LocalizedError enables the ability to updated the localizedDescription and pass along libXMTP API generated errors to SDK clients.

Scope 🔭

  • ApiClient
  • ApiClientError
  • GenericErrorDescribing

Out of Scope ⚔️

  • Included tests are out of scope for this pull request. The primary focus of this effort was to forward rate limiting errors to SDK clients. Rate limiting errors are triggered by the ingress point to either the development or production environment; neither of which would be suitable for automated testing.

Refactor ApiClientError from an Enum to a Struct which conforms to LocalizedError and GenericErrorDescribing.
@zombieobject zombieobject added the enhancement New feature or request label Mar 13, 2024
@zombieobject zombieobject self-assigned this Mar 13, 2024
@zombieobject zombieobject requested a review from a team as a code owner March 13, 2024 20:00
@zombieobject zombieobject enabled auto-merge (squash) March 13, 2024 20:00
@zombieobject zombieobject merged commit 9cc6b73 into main Mar 13, 2024
2 checks passed
@zombieobject zombieobject deleted the em/refactor-api-client-error branch March 13, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants