title: Controller still calls method after exception is thrown
body: <p>I would like my controller not to execute the method called in that controller if the JSON I input generates an Exception.</p>
  <p>Here is my controller</p>
  <pre><code>@PostMapping
      public BankUser save(@RequestBody BankUser bankUser) throws SQLIntegrityConstraintViolationException {
          accountService.save(bankUser);
          return userService.save(bankUser);
      }
  </code></pre>
  <p>I want to automatically create an account when a new user is added, unfortunately, if I try to pass a duplicate user, the user is not created, but the account for that user still is created, with help of the save method in the accountService layer.</p>
  <p>My question is if I could somehow handle the exeption thrown by the controller, in a way that I call the save() method of the accountRepository only if the controller does not throw any error.</p>