Add redirection in submission handler How can I redirect users to a node in a form submission handler similarly to the following code?

In my form alter I have added an additional submit button:

$form['actions']['save_and_exit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Save &amp; Exit'),
    '#submit' =&gt; array('custom_submit'),
  );

function custom_submit(&amp;$form, \Drupal\Core\Form\FormStateInterface 
  $form_state) {
    $syst‌​em_path = '/node/2';
    $url = \Drupal::service('path.alias_manager')-&gt;getAliasByPath($syst‌​em_path);
    $form_state-&gt;setRedirect($url);
}


Then I'm getting following error:


  Symfony\Component\Routing\Exception\RouteNotFoundException: Route
  "/mypage" does not exist. in
  Drupal\Core\Routing\RouteProvider->getRouteByName() (line 190 of
  C:\wamp\www\www_assure_local_com\core\lib\Drupal\Core\Routing\RouteProvider.php).


where /mypage is the url alias of my /node/2.
A form submission handler never returns a RedirectResponse object to redirect users. (It actually doesn't return any value.)

A form submission handler calls FormState::setRedirect(), or FormState::setRedirectUrl() which accepts a Url object, for example the value returned from Url::fromUri('//my_node_url_alias').