Whilst trying to reproduce
OPENAM-6997 I've seen a bug in the auditResponse implementation, whereby the auditing code only captured checked exceptions and it ignores RuntimeExceptions.
A simple solution for that would be to make sure that the auditing filter also logs in the "thenOnRuntimeException" branch of the Promise logic.
Steps to reproduce:
- call a REST endpoint and make sure that the REST endpoint throws a RuntimeException
- check the audit logs for entries corresponding to that failure.