Skip to content

Commit bfe7195

Browse files
authored
Merge pull request #18439 from Expensify/ionatan_improvemanywrites
Improve the many writes error message
2 parents bb13d03 + bf28e4e commit bfe7195

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libs/HttpUtils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ function processHTTPRequest(url, method = 'get', body = null, canCancel = true,
9696
});
9797
}
9898
if (response.jsonCode === CONST.JSON_CODE.MANY_WRITES_ERROR) {
99-
const {phpCommandName, authWriteCommandsCount} = response.data;
100-
const message = `The API call (${phpCommandName}) did ${authWriteCommandsCount - 1} more Auth write requests than allowed. Check the APIWriteCommands class in Web-Expensify`;
99+
const {phpCommandName, authWriteCommands} = response.data;
100+
// eslint-disable-next-line max-len
101+
const message = `The API call (${phpCommandName}) did more Auth write requests than allowed. Count ${authWriteCommands.length}, commands: ${authWriteCommands.join(', ')}. Check the APIWriteCommands class in Web-Expensify`;
101102
alert('Too many auth writes', message);
102103
}
103104
return response;

0 commit comments

Comments
 (0)