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
|
|
@ -10,6 +10,11 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
// Error defines model for Error.
|
||||
type Error struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// RequestJobJSONBody defines parameters for RequestJob.
|
||||
type RequestJobJSONBody map[string]interface{}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue