The Exception that is delivered here is LoginFailedException, not UnauthorizedUserException.
https://git.scc.kit.edu/simon/reg-app/blob/branch-2.5/bwreg-webapp/src/main/java/edu/kit/scc/webreg/rest/AttributeQueryController.java#L101