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

fix: Http client exception not handled properly resulting in incorrectly formatted error #1021

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

2shrestha22
Copy link

@2shrestha22 2shrestha22 commented Nov 27, 2024

Pull Request

Issue

Closes: #1022

Approach

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, code comments)

Copy link

parse-github-assistant bot commented Nov 27, 2024

Thanks for opening this pull request!

@@ -22,6 +22,12 @@ ParseResponse buildParseResponseWithException(Exception exception) {
));
}

if (exception is ClientException) {
Copy link
Member

@mbfakourii mbfakourii Nov 28, 2024

Choose a reason for hiding this comment

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

We use two clients, dio and http, at Parse Flutter !

In this change you are using the functions of the http package. Will this not cause any problems when we use the dio package client?

Copy link
Author

Choose a reason for hiding this comment

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

DioException is already being handled above but ClientException was missing.

@mbfakourii
Copy link
Member

@mtrezza

Can you please run CI?

@mtrezza
Copy link
Member

mtrezza commented Nov 30, 2024

@mbfakourii done

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 43.47%. Comparing base (c388545) to head (65f624e).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...src/objects/response/parse_exception_response.dart 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1021      +/-   ##
==========================================
+ Coverage   43.37%   43.47%   +0.10%     
==========================================
  Files          61       61              
  Lines        3463     3466       +3     
==========================================
+ Hits         1502     1507       +5     
+ Misses       1961     1959       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtrezza mtrezza changed the title handle http ClientException fix: http client exception not handled properly resulting in incorrect error log Dec 4, 2024
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: http client exception not handled properly resulting in incorrect error log fix: Http client exception not handled properly resulting in incorrect error log Dec 4, 2024
@mtrezza mtrezza changed the title fix: Http client exception not handled properly resulting in incorrect error log fix: Http client exception not handled properly resulting in incorrectly formatted error Dec 4, 2024
@mtrezza
Copy link
Member

mtrezza commented Dec 4, 2024

I rephrased the PR title; not sure whether it accurately describes the issue, could you please review?

@2shrestha22
Copy link
Author

I think it's better.

@mtrezza
Copy link
Member

mtrezza commented Dec 8, 2024

There is still an open review discussion and the changelog entry + version bump is missing in the PR. See other PRs on how they are done. Then we can go ahead and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http ClientException is not handled
3 participants