How to get the ReportPDU info?

I am using the Snmp asynchronized get for V3 request. It works perfectly when credentials are all correct. But when I give wrong auth password, I can see that a report PDU send back with usmStatsWrongDigests(1.3.6.1.6.3.15.1.1.5.0), but for the ResponseEvent only contains a null responsePDU, no error code or error msg.
Question: how can I get the reported error? (So that can give user more info about what’s wrong in their provided params).

The REPORTs that should be handled by the USM and transport mapping, are processed by the Snmp.ReportProcessor which is implementing the Snmp.ReportHandler interface. You can set your own implementation of such a ReportHandler by using Snmp.setReportHandler.
In that case, you need to make sure to return the correct USM PDUs if such a report is being received, for example to support the engine ID discovery process correctly.

The usmStatsWrongDigest report is actually returned to the ResponseListener unless the SNMP4JSettings.ReportSecurityLevelStrategy suppress the acceptance of a REPORT PDU because the required security level is not available (i.e., encryption does not work because of a wrong password).

Thanks for the response, you are absolutely right.
The default ReportHandler of Snmp intercept
usmStatsUnknownEngineIDs(1.3.6.1.6.3.15.1.1.4.0) and usmStatsNotInTimeWindows(1.3.6.1.6.3.15.1.1.2.0), and do resent as needed for v3 initialization, and return ResponseEvent for other cases.
In detail:

  1. For wrong user-name, received usmStatsUnknownUserNames(1.3.6.3.15.1.1.3.0)
  2. For wrong auth password, received usmStatsWrongDigests(1.3.6.3.15.1.1.5.0)
    with almost no delay.
  3. But if give wrong priv password, then will not receive usmStatsDecryptionErrors(1.3.6.3.15.1.1.6.0) – no response, PDU will timeout after retries. Wireshark also proved that server side does not respond to wrong priv password encrypted PDU.