}
if (relayState.getBytes().length < 0 || relayState.getBytes().length > 80) {
reportError("INVALID_RELAY_STATE");
throw ExceptionUtils.toBadRequestException(null, null);
}
RequestState requestState = getStateProvider().removeRequestState(relayState);
if (requestState == null) {
reportError("MISSING_REQUEST_STATE");
throw ExceptionUtils.toBadRequestException(null, null);
}
if (isStateExpired(requestState.getCreatedAt(), 0)) {
reportError("EXPIRED_REQUEST_STATE");
throw ExceptionUtils.toBadRequestException(null, null);
}
return requestState;
}