-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DSET-4072] Include (truncated) response body in the error message in…
… case we fail to parse the response body (#29) * Update "apiCall()" function to include partial response body in the error message in case we fail to parse the response body as JSON. This will make troubleshooting various edge cases easier. * Store sanitized version of the addEvents API URL on the client and use this URL when sending the requests. Also include it with the error messages to make troubleshooting easier. * Add a comment. * Add unit test for handling trailing slash in the scalyr server config option. * Truncate response to 1000 instead of 500 characters. * Also assert on the actual error message logged and returned by the client. * Split it into two test cases and make sure one actually tests scenario without a slash.
- Loading branch information
Showing
4 changed files
with
113 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters