NXBT-638: add a method getError to avoid NoSuchMethodError when running unit tests