Fix error handling
Fix error handling

the function should return a tuple in order for the caller to check that the
first parameter is an exception. Without this, the exception is unpacked and
transformed into a string.

Change-Id: Ifa09ed8ff236d8296823655474c3f626644a241f

Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server