Skip to content

Commit d445ff3

Browse files
Add assertions in TestCSHttpConnectionErrorHandling to verify non-null response and correct error message for network errors, enhancing error handling test coverage.
1 parent adf4df4 commit d445ff3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contentstack/src/test/java/com/contentstack/sdk/TestCSHttpConnectionErrorHandling.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,7 @@ public void testGenerateBuiltErrorWithKnownType() throws Exception {
8282
invokeGenerateBuiltError(networkError);
8383

8484
response = connection.getResponse();
85+
assertNotNull(response);
86+
assertEquals("NetworkError", response.optString("error_message"));
8587
}
8688
}

0 commit comments

Comments
 (0)