api: return the right http error code
api: return the right http error code

Change-Id: I07ee7c137983e41f16c46a62d575e52e0ccc06f7

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