Skip to content

Commit

Permalink
fix: ParseServer.verifyServerUrl may fail if server response header…
Browse files Browse the repository at this point in the history
…s are missing; remove unnecessary logging (#8391)
  • Loading branch information
dblythy authored Jan 23, 2023
1 parent 5a35e6f commit 1c37a7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ParseServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ class ParseServer {
});
// verify the server url after a 'mount' event is received
/* istanbul ignore next */
api.on('mount', function () {
api.on('mount', async function () {
await new Promise(resolve => setTimeout(resolve, 1000));
ParseServer.verifyServerUrl();
});
}
Expand Down Expand Up @@ -415,8 +416,7 @@ class ParseServer {
const request = require('./request');
const response = await request({ url }).catch(response => response);
const json = response.data || null;
console.log(response.status, { json });
const retry = response.headers['retry-after'];
const retry = response.headers?.['retry-after'];
if (retry) {
await new Promise(resolve => setTimeout(resolve, retry * 1000));
return this.verifyServerUrl();
Expand Down

0 comments on commit 1c37a7c

Please sign in to comment.