Fix API exceptions handling for message and error code

API exceptions were not returning correct errorcode.
A bug will be opened for moving these exceptions into climate.api but
for this commit, the idea is just to quickly fix it.

Change-Id: I5563c93dac45e22dc3348f5e380521cf8537b440
Merge "Fix API exceptions handling for message and error code"