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

feat: Improve ParseError reporting by propagating Swift.Error #64

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

cbaker6
Copy link
Member

@cbaker6 cbaker6 commented Mar 7, 2023

New Pull Request Checklist

Issue Description

ParseError currently embeds Swift.Error's into its' message property making it hard to use as the String needs to be parsed.

Approach

Add a new property to ParseError called swift which is propagates the Swift.Error (when there is one).

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@cbaker6
Copy link
Member Author

cbaker6 commented Mar 7, 2023

@kennic this PR adds the ability for ParseError to propagate Swift.Error. I recommend using this repo as oppose to the parse-community as it's far behind. You can see why I recommend to use this repo in #7

You can update to version 4.16.2 from your current code to experience no breaking changes. I will release 5.0.0 this week, which will have a number of breaking changes, but drastic improvements and features.

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #64 (bd5fe3d) into main (2410ff6) will decrease coverage by 2.47%.
The diff coverage is 58.29%.

@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
- Coverage   90.00%   87.53%   -2.47%     
==========================================
  Files         166      126      -40     
  Lines       15025    12313    -2712     
==========================================
- Hits        13523    10778    -2745     
- Misses       1502     1535      +33     
Impacted Files Coverage Δ
Sources/ParseSwift/API/API+Command.swift 76.73% <0.00%> (-10.24%) ⬇️
...Authentication/Protocols/ParseAuthentication.swift 78.08% <0.00%> (-5.62%) ⬇️
Sources/ParseSwift/Storage/ParseStorage.swift 82.14% <ø> (ø)
Sources/ParseSwift/Types/Query.swift 86.05% <25.80%> (-1.34%) ⬇️
Sources/ParseSwift/Objects/ParseUser.swift 90.34% <26.31%> (+1.98%) ⬆️
Sources/ParseSwift/Objects/ParseInstallation.swift 88.07% <29.41%> (+2.37%) ⬆️
Sources/ParseSwift/Types/ParseFile.swift 56.58% <33.33%> (-38.68%) ⬇️
Sources/ParseSwift/Extensions/URLSession.swift 63.21% <38.09%> (-18.36%) ⬇️
Sources/ParseSwift/Objects/ParseObject.swift 90.95% <46.15%> (+2.35%) ⬆️
...thentication/3rd Party/ParseApple/ParseApple.swift 86.25% <50.00%> (ø)
... and 82 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cbaker6 cbaker6 merged commit 6cc76ec into main Mar 7, 2023
@cbaker6 cbaker6 deleted the improveError branch March 7, 2023 23:56
@kennic
Copy link

kennic commented Mar 8, 2023

Wow, didn't know about this separation, thanks for pointing this out. Will definitely using this repo from now on.

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.

2 participants