Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/hellosign/sdk/http/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public int asHttpCode() throws HelloSignException {
reset();
return code;
}
throw new HelloSignException("HTTP Code " + code);
throw new HelloSignException("HTTP Code " + code, code, null);
}

/**
Expand Down
12 changes: 9 additions & 3 deletions src/test/java/com/hellosign/sdk/HelloSignClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,16 @@ public void testCancelSignatureRequest() throws Exception {
assertTrue(client.cancelSignatureRequest("9cc3d5819959419abee4dbff2073d497e7c0a962"));
}

@Test(expected = HelloSignException.class)
public void testCancelSignatureRequestInvalid() throws Exception {
@Test
public void testCancelSignatureRequestInvalid() {
mockResponseCode(410);
client.cancelSignatureRequest("foo");
try {
client.cancelSignatureRequest("foo");
fail("Expected HelloSignException");
} catch (HelloSignException e) {
assertEquals("HTTP Code 410", e.getMessage());
assertTrue(e.getHttpCode() == 410);
}
}

@Test
Expand Down