class CmsPsuAisController implements CmsPsuAisApi {

    @Override
    public ResponseEntity<Boolean> authorisePartiallyConsent(String consentId, String instanceId) {
        try {
            return new ResponseEntity<>(cmsPsuAisService.authorisePartiallyConsent(consentId, instanceId), HttpStatus.OK);
        } catch (WrongChecksumException e) {
            log.info("Consent ID [{}], Instance ID: [{}]. Authorise partially AIS consent failed due to wrong checksum.", consentId, instanceId);
            return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
        }
    }

}