use errors inherited from RESTException in api endpoint

6 jobs for rest-errors in 16 minutes and 28 seconds (queued for 3 seconds)