File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/main/java/com/darksci/pardot/api/rest Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -133,11 +133,15 @@ public void close() {
133133 * Make a request against the Pardot API.
134134 * @param request The request to submit.
135135 * @return The response, in UTF-8 String format.
136- * @throws IOException if something goes wrong?
136+ * @throws RestException if something goes wrong.
137137 */
138138 @ Override
139- public RestResponse submitRequest (final Request request ) throws IOException {
140- return submitRequest (request , new RestResponseHandler ());
139+ public RestResponse submitRequest (final Request request ) throws RestException {
140+ try {
141+ return submitRequest (request , new RestResponseHandler ());
142+ } catch (IOException exception ) {
143+ throw new RestException (exception .getMessage (), exception );
144+ }
141145 }
142146
143147 /**
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public void init(final Configuration configuration) {
1919 }
2020
2121 @ Override
22- public RestResponse submitRequest (final Request request ) throws IOException {
22+ public RestResponse submitRequest (final Request request ) throws RestException {
2323 // Not implemented yet.
2424 return null ;
2525 }
You can’t perform that action at this time.
0 commit comments