Well  OfficeIdMismatchException extends AbstractPlatformResourceNotFoundException (a 404) all we do is add an error message that the user is present in another branch.

Calling findByOfficeWithNotFoundDetection  passing in staffId and userOffice.getId() as parameters would do the same (just throws a 404 as this staff isn't present in this office which is what we need, no real need to specify that the staff is present but in a different office etc)