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: some async/await methods won't throw errors #334

Merged
merged 5 commits into from
Jan 26, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jan 25, 2022

New Pull Request Checklist

Issue Description

Async/await methods that have void returns won't throw errors received from the server; particularly delete(), logout(), ParseUser.verif...(), and ParseAnalytics methods. They would on throw http errors.

In addition, some places in the code still force unwrap or can be done with less code.

Related issue: #n/a

Approach

The the returned value of async/await void methods and throw errors if needed.

Remove force unwrapping and clean up code.

TODOs before merging

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 25, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #334 (7584949) into main (d2de796) will increase coverage by 0.06%.
The diff coverage is 78.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
+ Coverage   85.06%   85.13%   +0.06%     
==========================================
  Files         114      114              
  Lines       12188    12208      +20     
==========================================
+ Hits        10368    10393      +25     
+ Misses       1820     1815       -5     
Impacted Files Coverage Δ
Sources/ParseSwift/Objects/ParseInstallation.swift 82.49% <0.00%> (+0.13%) ⬆️
Sources/ParseSwift/Objects/ParseUser.swift 83.18% <42.85%> (+0.27%) ⬆️
...ources/ParseSwift/Types/ParseAnalytics+async.swift 90.00% <75.00%> (-10.00%) ⬇️
...s/ParseSwift/Objects/ParseInstallation+async.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/Objects/ParseObject+async.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/Objects/ParseUser+async.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/Types/ParseFile+async.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/Objects/ParseObject.swift 82.74% <0.00%> (+0.45%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2de796...7584949. Read the comment docs.

@cbaker6 cbaker6 changed the title refactor: remove force unwrapping fix: some async/await methods won't throw errors Jan 26, 2022
@cbaker6 cbaker6 merged commit 879055b into parse-community:main Jan 26, 2022
@cbaker6 cbaker6 deleted the prep branch January 26, 2022 18:53
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.

None yet

1 participant