[REST] refactored rest responses to Either RESTError a

This way we can have a handle of the errors in the high-level
components. Before they were implicitly discarded.
Status Job ID Name Coverage
  Test
failed #1840
test

 
Name Stage Failure
failed
test Test There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job trace