-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab865c5
commit 2ca4aba
Showing
23 changed files
with
357 additions
and
226 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
35 changes: 0 additions & 35 deletions
35
src/main/java/io/cdap/plugin/servicenow/apiclient/NonRetryableException.java
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/main/java/io/cdap/plugin/servicenow/apiclient/RetryableException.java
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
src/main/java/io/cdap/plugin/servicenow/apiclient/ServiceNowAPIException.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package io.cdap.plugin.servicenow.apiclient; | ||
|
||
import org.apache.http.HttpResponse; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* Custom Exception class for propagating API errors/exceptions back to caller. | ||
*/ | ||
public class ServiceNowAPIException extends Exception { | ||
|
||
@Nullable private final HttpResponse httpResponse; | ||
private final boolean isErrorRetryable; | ||
|
||
public ServiceNowAPIException( | ||
Throwable t, @Nullable HttpResponse httpResponse, boolean isErrorRetryable) { | ||
super(t); | ||
this.httpResponse = httpResponse; | ||
this.isErrorRetryable = isErrorRetryable; | ||
} | ||
|
||
public ServiceNowAPIException( | ||
String message, @Nullable HttpResponse httpResponse, boolean isErrorRetryable) { | ||
super(message); | ||
this.httpResponse = httpResponse; | ||
this.isErrorRetryable = isErrorRetryable; | ||
} | ||
|
||
public HttpResponse getHttpResponse() { | ||
return httpResponse; | ||
} | ||
|
||
public boolean isErrorRetryable() { | ||
return isErrorRetryable; | ||
} | ||
} |
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
Oops, something went wrong.