Fix some error handling and tracing issues

Fix #1315
Fix #1314
Fix #1318
I think its good enough since ultimately it is shown in a dashboard (more info will exist in the trace).