Skip to content

Commit b7430eb

Browse files
committed
Add a promise reject instead of a throw
1 parent c0d9002 commit b7430eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Adapters/Auth/google.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ function validateAuthToken({ id, access_token }) {
115115
// Returns a promise that fulfills if this user id is valid.
116116
function validateAuthData({ id, id_token, access_token }, options) {
117117
if (!id_token && !access_token) {
118-
throw new Parse.Error(
118+
return Promise.reject(new Parse.Error(
119119
Parse.Error.OBJECT_NOT_FOUND,
120120
`id_token or access_token is missing for this user.`
121-
);
121+
));
122122
}
123123
// Returns a promise that fulfills if this user id is valid.
124124
if (id_token) {

0 commit comments

Comments
 (0)