improved message formatting for errors in err object is provided as metadata