Skip to content

add asserts to verify response code.#1011

Merged
trask merged 3 commits into
masterfrom
verify_response_code
Aug 22, 2019
Merged

add asserts to verify response code.#1011
trask merged 3 commits into
masterfrom
verify_response_code

Conversation

@littleaj

@littleaj littleaj commented Aug 7, 2019

Copy link
Copy Markdown
Contributor

This should Fix #810

@littleaj littleaj requested a review from trask August 7, 2019 20:49
@littleaj littleaj self-assigned this Aug 7, 2019
@littleaj

littleaj commented Aug 9, 2019

Copy link
Copy Markdown
Contributor Author

latest commit should fix #600 (pending review)

if an exception has been thrown, assume failed request with status=500
@littleaj littleaj force-pushed the verify_response_code branch from c858563 to d3821f1 Compare August 9, 2019 23:12
@@ -112,6 +114,11 @@ public void handleEnd(ServletRequest request, ServletResponse response,
int resultCode = extractor.getStatusCode(response);
requestTelemetry.setSuccess(resultCode < 400);
requestTelemetry.setResponseCode(Integer.toString(resultCode));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these three lines above can go in a conditional ... == null and then the if below can be else

@littleaj littleaj added this to the 2.5.0-BETA.3 milestone Aug 21, 2019
@trask trask merged commit d34e6f0 into master Aug 22, 2019
@trask trask deleted the verify_response_code branch September 21, 2020 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application Insights showing 200 for failed requests

2 participants