API: make error message output in-line with old API server

Change-Id: Icc897fabf611a1792726f5f7b0cd864a7e0879c5
Merge "API: make error message output in-line with old API server"