Improved error display

Change-Id: I70f9e81da8fca3d9b13f4b0b0bfcdc3a957859c2
Added flattenObject().

Change-Id: I85152460f59ea5a69629949e71a4ae968ce89fbc
Now displaying metadata when viewType is not 'tabular'

Change-Id: I66b8bccf893889f2e6e946952152f172e66d102c