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: ParseServer.verifyServerUrl may fail if server response headers are missing; remove unnecessary logging #8391

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
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'];
dblythy marked this conversation as resolved.
Show resolved Hide resolved
if (retry) {
await new Promise(resolve => setTimeout(resolve, retry * 1000));
return this.verifyServerUrl();
Expand Down