Commit 206dba0b authored by Greg Messner's avatar Greg Messner
Browse files

Changed how the HTTP status is determined.

parent 0c2c14e9
...@@ -9,6 +9,8 @@ public class GitLabApiException extends Exception { ...@@ -9,6 +9,8 @@ public class GitLabApiException extends Exception {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private StatusType statusInfo; private StatusType statusInfo;
private int httpStatus;
private String message; private String message;
/** /**
...@@ -20,6 +22,7 @@ public class GitLabApiException extends Exception { ...@@ -20,6 +22,7 @@ public class GitLabApiException extends Exception {
super(); super();
statusInfo = response.getStatusInfo(); statusInfo = response.getStatusInfo();
httpStatus = response.getStatus();
if (response.hasEntity()) { if (response.hasEntity()) {
try { try {
...@@ -67,6 +70,6 @@ public class GitLabApiException extends Exception { ...@@ -67,6 +70,6 @@ public class GitLabApiException extends Exception {
* @return * @return
*/ */
public final int getHttpStatus () { public final int getHttpStatus () {
return (statusInfo != null ? statusInfo.getStatusCode() : 0); return (httpStatus);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment