Improve error logging by logging full error object (#6464)