Skip to content

Commit

Permalink
Update message in handlePotentialSnapshotErrors for payload errors
Browse files Browse the repository at this point in the history
Reviewed By: lynnshaoyu

Differential Revision: D65363290

fbshipit-source-id: 324d18b3fcd9811834d80b942edce4b89d5e3387
  • Loading branch information
itamark authored and facebook-github-bot committed Nov 7, 2024
1 parent 5600502 commit 402aa97
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test('Throws if a field has error with explicit error handling enabled', () => {
componentDisplayName,
);
}).toThrowError(
'Relay: Unexpected response payload - this object includes an errors property in which you can access the underlying errors',
'Relay: Unexpected response payload - check server logs for details.',
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ test('Field error with @throwOnFieldError', async () => {
expect(results).toEqual([
{
error: new Error(
'Relay: Unexpected response payload - this object includes an errors property in which you can access the underlying errors',
'Relay: Unexpected response payload - check server logs for details.',
),
state: 'error',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ describe('handlePotentialSnapshotErrors', () => {
},
]);
}).toThrowError(
/^Relay: Unexpected response payload - this object includes an errors property in which you can access the underlying errors/,
/^Relay: Unexpected response payload - check server logs for details./,
);

const eventsLogged = relayFieldLogger.mock.calls.map(call => call[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function handleFieldErrors(
);
case 'relay_field_payload.error':
throw new Error(
`Relay: Unexpected response payload - this object includes an errors property in which you can access the underlying errors`,
`Relay: Unexpected response payload - check server logs for details.`,
);
case 'missing_expected_data.throw':
throw new Error(
Expand Down

0 comments on commit 402aa97

Please sign in to comment.