@Override public GoPluginApiResponse handle(GoPluginApiRequest goPluginApiRequest) { try { if (handlerMap.containsKey(goPluginApiRequest.requestName())) { return handlerMap.get(goPluginApiRequest.requestName()).handle(goPluginApiRequest); } return DefaultGoPluginApiResponse.badRequest( String.format("Invalid request name %s", goPluginApiRequest.requestName())); } catch (Throwable e) { return DefaultGoPluginApiResponse.error(e.getMessage()); } }