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:
parent
3bedd25087
commit
ca35f25fcf
4 changed files with 80 additions and 13 deletions
|
|
@ -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"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue