worker/client: expose server errors

The worker API returns errors of the form:

  { "message": "..." }

Print the message of those errors when receiving an error on the client.

This adds an `Error` type to openapi.yml and marks all routes as
returning it on 4XX and 5XX.
This commit is contained in:
Lars Karlitski 2020-09-09 10:23:08 +02:00 committed by Tom Gundersen
parent 3bedd25087
commit ca35f25fcf
4 changed files with 80 additions and 13 deletions

View file

@ -29,10 +29,6 @@ type statusResponse struct {
Status string `json:"status"`
}
type errorResponse struct {
Message string `json:"message"`
}
type requestJobResponse struct {
Id uuid.UUID `json:"id"`
Manifest distro.Manifest `json:"manifest"`