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

Adding Error Handler #158

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Adding Error Handler #158

merged 2 commits into from
Jun 29, 2021

Conversation

alallema
Copy link
Contributor

@alallema alallema commented Jun 22, 2021

Description
Adapt to the error handler of other SDKs with 3 main errors type:

  • MeiliSearchApiError
  • MeiliSearchCommunicationError
  • MeiliSearchTimeoutError

Add the possibility to set a timeout in the client for all the requests passed.

Issue related
closes #149
closes #161

@curquiza
Copy link
Member

@alallema, be careful, GH did not add your issue as a Linked issues in this PR 😅

@alallema
Copy link
Contributor Author

@alallema, be careful, GH did not add your issue as a Linked issues in this PR 😅

Thanks, @curquiza! It's a draft I didn't finish to edit it

@alallema alallema linked an issue Jun 23, 2021 that may be closed by this pull request
@alallema alallema added the enhancement New feature or request label Jun 24, 2021
@alallema alallema marked this pull request as ready for review June 24, 2021 07:54
@alallema alallema requested review from eskombro and curquiza June 24, 2021 07:54
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore I meant to comment, not necessarily request changes, sorry

Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing job @alallema !

I would add an Issue that details a little bit the Timeout handling that is included in this PR, and link it to the PR. Because this timeout change is not only related to the custom error handler, but actually adds some functionality to the HTTP client.

@curquiza curquiza dismissed eskombro’s stale review June 28, 2021 11:13

According to eskombro's comment: #158 (review)

Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!! Thanks @alallema!!

@curquiza
Copy link
Member

curquiza commented Jun 28, 2021

@alallema this PR is breaking since it changes the way the errors are raised

@alallema alallema added the breaking-change The related changes are breaking for the users label Jun 28, 2021
@alallema alallema requested a review from eskombro June 28, 2021 14:40
@alallema
Copy link
Contributor Author

Issue created
bors merge

@bors
Copy link
Contributor

bors bot commented Jun 29, 2021

@bors bors bot merged commit f43e1d3 into main Jun 29, 2021
@bors bors bot deleted the error-handler branch June 29, 2021 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timeout in client A basic error handler
3 participants