Implementing better diagnostics in the case of invalid response value that can't be casted to the required type. Should allow to understand root cause of issue 5043