Parse-SDK-JS icon indicating copy to clipboard operation
Parse-SDK-JS copied to clipboard

fix: allow `Parse.Cloud.beforeSubscribe` rejections to be caught by `ParseQuery.subscribe`

Open dblythy opened this issue 3 years ago β€’ 4 comments

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

Cloud errors thrown from beforeConnect and beforeSubscribe will now catch, just like errors from query.find

Related issue: #1489

Approach

Throws error to subscription promise if error occurs

TODOs before merging

  • [x] Add tests

dblythy avatar Jun 05 '22 11:06 dblythy

Thanks for opening this pull request!

  • πŸŽ‰ We are excited about your hands-on contribution!

Since this is a breaking change, how would you like to proceed - add a temporary Parse Server option (or maybe there is an alternative?) or wait to merge until Parse Server 6?

mtrezza avatar Jun 05 '22 15:06 mtrezza

Which approach do you think is best? It’s not a major issue so perhaps we can wait

dblythy avatar Jun 05 '22 15:06 dblythy

Can you think of a way to support both for a while without making it a breaking change or adding a Parse Server option? Otherwise up to you, whatever you think is best.

Should we add this as a feature or fix? The issue is currently classified as feature.

mtrezza avatar Jun 05 '22 20:06 mtrezza

@dblythy @mtrezza Can we get this into the 4.0.0 release?

dplewis avatar Nov 10 '22 15:11 dplewis

That would be good

mtrezza avatar Nov 10 '22 16:11 mtrezza

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

Codecov Report

Base: 99.93% // Head: 99.89% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (e062596) compared to base (bc04b4b). Patch coverage: 81.81% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #1490      +/-   ##
==========================================
- Coverage   99.93%   99.89%   -0.04%     
==========================================
  Files          61       61              
  Lines        5966     5973       +7     
  Branches     1366     1367       +1     
==========================================
+ Hits         5962     5967       +5     
- Misses          4        6       +2     
Impacted Files Coverage Ξ”
src/LiveQueryClient.js 98.99% <81.81%> (-1.01%) :arrow_down:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Nov 11 '22 00:11 codecov[bot]

Yes, that sounds good to me

dblythy avatar Nov 14 '22 23:11 dblythy

πŸŽ‰ This change has been released in version 4.0.0-alpha.2

parseplatformorg avatar Nov 15 '22 02:11 parseplatformorg

The label state:released-alpha cannot be used in combination with state:breaking.

πŸŽ‰ This change has been released in version 4.0.0-beta.1

parseplatformorg avatar Jan 23 '23 19:01 parseplatformorg

πŸŽ‰ This change has been released in version 4.0.0

parseplatformorg avatar Jan 23 '23 19:01 parseplatformorg