package ee.tuleva.onboarding.auth;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(value= HttpStatus.CONTINUE, reason="AUTHENTICATION_NOT_COMPLETE") //<- TODO: this is not working
public class MobileIdAuthNotCompleteException extends RuntimeException {
    MobileIdAuthNotCompleteException() {
        super("AUTHENTICATION_NOT_COMPLETE");
    }
}

@@ -60,201 +60,73 @@
 ork.
-http.HttpStatus;%0Aimport org.springframework.web.bind.annotation.ResponseStatus;%0A%0A@ResponseStatus(value= HttpStatus.CONTINUE, reason=%22AUTHENTICATION_NOT_COMPLETE%22) //%3C- TODO: this is not working
+security.oauth2.common.exceptions.ClientAuthenticationException;%0A
 %0Apub
@@ -180,15 +180,28 @@
 nds 
-Runtime
+ClientAuthentication
 Exce
@@ -268,38 +268,249 @@
 er(%22
-AUTHENTICATION_NOT_COMPLETE%22);
+Please keep polling.%22);%0A    %7D%0A%0A    @Override%0A    public String getOAuth2ErrorCode() %7B%0A        return %22AUTHENTICATION_NOT_COMPLETE%22;%0A    %7D%0A%0A    @Override%0A    public int getHttpErrorCode() %7B%0A        return 200; //TODO: change to something else
 %0A   

Fix Mobile keep polling exception