Skip to content

Commit 8e576ee

Browse files
committed
Change default server fail message
1 parent 1be83d0 commit 8e576ee

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

integration/test/ParseServerTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('ParseServer', () => {
1616
const object = new TestObject({ foo: 'bar' });
1717
await parseServer.handleShutdown();
1818
await new Promise((resolve) => parseServer.server.close(resolve));
19-
await expectAsync(object.save()).toBeRejectedWithError('XMLHttpRequest failed: "Unable to connect to the Parse API"');
19+
await expectAsync(object.save()).toBeRejectedWithError('The connection to the Parse servers failed.');
2020
await reconfigureServer({});
2121
await object.save();
2222
assert(object.id);

src/CoreManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const config: Config & { [key: string]: mixed } = {
177177
!!process.versions.node &&
178178
!process.versions.electron,
179179
REQUEST_ATTEMPT_LIMIT: 5,
180-
CONNECTION_FAILED_MESSAGE: 'XMLHttpRequest failed: "Unable to connect to the Parse API"',
180+
CONNECTION_FAILED_MESSAGE: 'The connection to the Parse servers failed.',
181181
REQUEST_BATCH_SIZE: 20,
182182
REQUEST_HEADERS: {},
183183
SERVER_URL: 'https://api.parse.com/1',

src/__tests__/EventuallyQueue-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ describe('EventuallyQueue', () => {
241241
jest.spyOn(object, 'destroy').mockImplementationOnce(() => {
242242
throw new ParseError(
243243
ParseError.CONNECTION_FAILED,
244-
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
244+
'The connection to the Parse servers failed.'
245245
);
246246
});
247247
jest.spyOn(EventuallyQueue, 'remove').mockImplementationOnce(() => {});
@@ -332,7 +332,7 @@ describe('EventuallyQueue', () => {
332332
jest.spyOn(object, 'save').mockImplementationOnce(() => {
333333
throw new ParseError(
334334
ParseError.CONNECTION_FAILED,
335-
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
335+
'The connection to the Parse servers failed.'
336336
);
337337
});
338338
jest.spyOn(EventuallyQueue, 'remove').mockImplementationOnce(() => {});

src/__tests__/ParseObject-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ describe('ParseObject', () => {
15771577
jest.spyOn(p, 'save').mockImplementationOnce(() => {
15781578
throw new ParseError(
15791579
ParseError.CONNECTION_FAILED,
1580-
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
1580+
'The connection to the Parse servers failed.'
15811581
);
15821582
});
15831583
await p.saveEventually();
@@ -2932,7 +2932,7 @@ describe('ObjectController', () => {
29322932
jest.spyOn(p, 'destroy').mockImplementationOnce(() => {
29332933
throw new ParseError(
29342934
ParseError.CONNECTION_FAILED,
2935-
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
2935+
'The connection to the Parse servers failed.'
29362936
);
29372937
});
29382938
await p.destroyEventually();

src/__tests__/RESTController-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe('RESTController', () => {
7373
);
7474
RESTController.ajax('POST', 'users', {}).then(null, err => {
7575
expect(err.code).toBe(100);
76-
expect(err.message).toBe('XMLHttpRequest failed: "Unable to connect to the Parse API"');
76+
expect(err.message).toBe('The connection to the Parse servers failed.');
7777
done();
7878
});
7979
jest.runAllTimers();
@@ -104,7 +104,7 @@ describe('RESTController', () => {
104104
null,
105105
err => {
106106
expect(err.code).toBe(100);
107-
expect(err.message).toBe('XMLHttpRequest failed: "Unable to connect to the Parse API"');
107+
expect(err.message).toBe('The connection to the Parse servers failed.');
108108
}
109109
);
110110
await flushPromises();

0 commit comments

Comments
 (0)