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: Connection failure in Parse.Object.saveEventually and Parse.Object.destroyEventually not handled on custom Parse.Error.CONNECTION_FAILURE message #2032

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Sep 28, 2023

Pull Request

Issue

Use error codes instead of hard coded messages for connection failures. With the addition of custom Error messages, changing the default connection failure message would cause an error.

Related: #2014

Tasks

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 28, 2023

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@dplewis dplewis requested a review from mtrezza September 28, 2023 00:38
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (dc91d0f) 100.00% compared to head (de4be53) 100.00%.
Report is 1 commits behind head on alpha.

❗ Current head de4be53 differs from pull request most recent head 6e95f04. Consider uploading reports for the commit 6e95f04 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##             alpha     #2032   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           61        61           
  Lines         6176      6176           
  Branches      1496      1496           
=========================================
  Hits          6176      6176           
Files Coverage Δ
src/ParseObject.js 100.00% <100.00%> (ø)

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

@mtrezza
Copy link
Member

mtrezza commented Sep 28, 2023

Could you please describe the issue in more detail? This PR has no issue linked and no issue description.

@dplewis
Copy link
Member Author

dplewis commented Sep 28, 2023

Updated the OP, I don't know how that happened lol

@mtrezza
Copy link
Member

mtrezza commented Sep 28, 2023

It's difficult for me to review the PR because the description under "Issue" describes the change in this PR, not the bug. And there is no issue linked with an issue description. Also the PR title describes the fix, while it should only describe the bug.

Could you please:

  • Add an issue description
  • Change the PR title to describe the bug; remember that it will be part of the changelog

@mtrezza mtrezza changed the title fix: Properly handle connection failure in saveEventually and destroyEventually fix: Connection failure in saveEventually and destroyEventually not handled properly Oct 3, 2023
@mtrezza mtrezza changed the title fix: Connection failure in saveEventually and destroyEventually not handled properly fix: Connection failure in Parse.Object.saveEventually and Parse.Object.destroyEventually not handled properly Oct 3, 2023
@mtrezza
Copy link
Member

mtrezza commented Oct 3, 2023

I've changed the PR title to the best of my ability, although I'm still not sure what the issue here is. The PR seems to identify the connection error state by the error code now instead of the error message, which seems more robust. I assume this was a problem when calling the ...eventually methods. If you could clarify the issue in the issue description above and if necessary adapt the PR title, then we can merge.

@dplewis
Copy link
Member Author

dplewis commented Oct 3, 2023

The issue is with the introduction of Custom Parse Error Messages, a custom connection failure message would break this. This was partially added https://github.com/parse-community/Parse-SDK-JS/pull/2014/files#diff-0569cde5238e6df9fc3d56e880efe2653bb1bf438be2c70dc1b504f5def263c5L278 but was missed for some reason.

@dplewis dplewis changed the title fix: Connection failure in Parse.Object.saveEventually and Parse.Object.destroyEventually not handled properly fix: Connection failure in Parse.Object.saveEventually and Parse.Object.destroyEventually not handled on custom Parse.Error.CONNECTION_FAILURE message Oct 3, 2023
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good; thanks for expanding the PR title

@mtrezza mtrezza merged commit 4da3ebc into parse-community:alpha Oct 4, 2023
7 checks passed
parseplatformorg pushed a commit that referenced this pull request Oct 4, 2023
# [4.3.0-alpha.3](4.3.0-alpha.2...4.3.0-alpha.3) (2023-10-04)

### Bug Fixes

* Connection failure in `Parse.Object.saveEventually` and `Parse.Object.destroyEventually` not handled on custom `Parse.Error.CONNECTION_FAILURE` message ([#2032](#2032)) ([4da3ebc](4da3ebc))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.0-alpha.3

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Oct 4, 2023
@dplewis dplewis deleted the eventually-connection branch October 4, 2023 15:28
parseplatformorg pushed a commit that referenced this pull request Nov 16, 2023
## [4.3.1-beta.1](4.3.0...4.3.1-beta.1) (2023-11-16)

### Bug Fixes

* Connection failure in `Parse.Object.saveEventually` and `Parse.Object.destroyEventually` not handled on custom `Parse.Error.CONNECTION_FAILURE` message ([#2032](#2032)) ([4da3ebc](4da3ebc))
* Docs fail with `Cannot find module 'taffydb'` ([#2036](#2036)) ([dc91d0f](dc91d0f))
* Error in web context when `window.indexedDB` API is available but protected ([#2039](#2039)) ([360981f](360981f))
* Security upgrade browserify-sign from 4.2.1 to 4.2.2 ([#2043](#2043)) ([fd50b9d](fd50b9d))
* Security upgrade crypto-js from 4.1.1 to 4.2.0 ([#2042](#2042)) ([681fbdf](681fbdf))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.1-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Nov 16, 2023
parseplatformorg pushed a commit that referenced this pull request Nov 18, 2023
## [4.3.1](4.3.0...4.3.1) (2023-11-18)

### Bug Fixes

* Connection failure in `Parse.Object.saveEventually` and `Parse.Object.destroyEventually` not handled on custom `Parse.Error.CONNECTION_FAILURE` message ([#2032](#2032)) ([4da3ebc](4da3ebc))
* Docs fail with `Cannot find module 'taffydb'` ([#2036](#2036)) ([dc91d0f](dc91d0f))
* Error in web context when `window.indexedDB` API is available but protected ([#2039](#2039)) ([360981f](360981f))
* Security upgrade browserify-sign from 4.2.1 to 4.2.2 ([#2043](#2043)) ([fd50b9d](fd50b9d))
* Security upgrade crypto-js from 4.1.1 to 4.2.0 ([#2042](#2042)) ([681fbdf](681fbdf))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.1

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 18, 2023
parseplatformorg pushed a commit that referenced this pull request Nov 18, 2023
## [4.3.1-alpha.1](4.3.0...4.3.1-alpha.1) (2023-11-18)

### Bug Fixes

* Connection failure in `Parse.Object.saveEventually` and `Parse.Object.destroyEventually` not handled on custom `Parse.Error.CONNECTION_FAILURE` message ([#2032](#2032)) ([4da3ebc](4da3ebc))
* Docs fail with `Cannot find module 'taffydb'` ([#2036](#2036)) ([dc91d0f](dc91d0f))
* Error in web context when `window.indexedDB` API is available but protected ([#2039](#2039)) ([360981f](360981f))
* Security upgrade browserify-sign from 4.2.1 to 4.2.2 ([#2043](#2043)) ([fd50b9d](fd50b9d))
* Security upgrade crypto-js from 4.1.1 to 4.2.0 ([#2042](#2042)) ([681fbdf](681fbdf))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.3.1-alpha.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants