def handle(self, request, data, **kwargs):
        router_id = self.initial['router_id']
        try:
            route = {'nexthop': data['nexthop'],
                     'destination': data['destination']}
            api.router_static_route_add(request,
                                        router_id,
                                        route)
            msg = _('Static route added')
            LOG.debug(msg)
            messages.success(request, msg)
            return True
        except neutron_exc.BadRequest as e:
            msg = (_('Invalid format for routes : %s') % e)
            LOG.info(msg)
            messages.error(request, msg)
            redirect = reverse(self.failure_url, args=[router_id])
            exceptions.handle(request, msg, redirect=redirect)
        except Exception as e:
            msg = (_('Failed to add route : %s') % e)
            LOG.info(msg)
            messages.error(request, msg)
            redirect = reverse(self.failure_url, args=[router_id])
            exceptions.handle(request, msg, redirect=redirect)
dataset/ETHPy150Open openstack/horizon/openstack_dashboard/dashboards/project/routers/extensions/extraroutes/forms.py/AddRouterRoute.handle/original