Fix exception rendering for client

Exceptions from the API were not properly catched.

Change-Id: Ib1db84a0a8b56f1135ea9d73c688b55d18fa683a
Closes-Bug: #1272352