Logs caught errors, returns 500 for err obj.