Skip to content

Commit

Permalink
Merge pull request #2204 from tomzo/2203-fix
Browse files Browse the repository at this point in the history
#2203 properly handle null response from plugin
  • Loading branch information
ketan committed May 25, 2016
2 parents 5bdb90d + 219f5fe commit d8f692f
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -30,6 +30,9 @@ public <T> T submitRequest(String pluginId, String requestName, PluginInteractio
apiRequest.setRequestBody(pluginInteractionCallback.requestBody(resolvedExtensionVersion));
apiRequest.setRequestParams(pluginInteractionCallback.requestParams(resolvedExtensionVersion));
GoPluginApiResponse response = pluginManager.submitTo(pluginId, apiRequest);
if(response == null){
throw new RuntimeException("The plugin sent a null response");
}
if (DefaultGoApiResponse.SUCCESS_RESPONSE_CODE == response.responseCode()) {
return pluginInteractionCallback.onSuccess(response.responseBody(), resolvedExtensionVersion);
}
Expand Down

0 comments on commit d8f692f

Please sign in to comment.