Show better error when json fail to parse template

Change-Id: I0d888fc180dd118c50b93ce4393f06d89780a0c5
Partial-Bug: 1261224
Merge "Show better error when json fail to parse template"