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(RestWrite): make method async as expected in usage #6025

Merged
merged 1 commit into from
Sep 4, 2019
Merged

fix(RestWrite): make method async as expected in usage #6025

merged 1 commit into from
Sep 4, 2019

Conversation

omairvaiyani
Copy link
Contributor

@omairvaiyani omairvaiyani commented Sep 4, 2019

The method createSessionToken in RestWrite.js is assumed to always return a promise (see Line 961 in handleFollowUp) - this was throwing an error cannot read 'then' of undefined. This simple one word change fixes that error.

The method `createSessionToken` in RestWrite.js is assumed to always return a promise (see Line 961 in `handleFollowUp`) - this was throwing an error `cannot read 'then' of undefined`. This simply one word change fixes that error.
@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #6025 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6025      +/-   ##
==========================================
- Coverage   93.79%   93.79%   -0.01%     
==========================================
  Files         164      164              
  Lines       11096    11096              
==========================================
- Hits        10408    10407       -1     
- Misses        688      689       +1
Impacted Files Coverage Δ
src/RestWrite.js 93.56% <100%> (-0.17%) ⬇️

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 6497ec7...186a55a. Read the comment docs.

Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

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

LGTM

@davimacedo davimacedo merged commit 618fe37 into parse-community:master Sep 4, 2019
@omairvaiyani omairvaiyani deleted the omairvaiyani-patch-restwrite branch September 10, 2019 06:44
@SebC99
Copy link
Contributor

SebC99 commented Nov 4, 2019

@omairvaiyani it seems we should also declare async the handleFollowUp method or at least to ensure the last return is really a promise, which is not the case for the this.handleFollowup.bind(this)

(we have some weird cases of instrumentations where this method is not recognized as a promise)

UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
…ty#6025)

The method `createSessionToken` in RestWrite.js is assumed to always return a promise (see Line 961 in `handleFollowUp`) - this was throwing an error `cannot read 'then' of undefined`. This simply one word change fixes that error.
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.

3 participants