Skip to content

Request to resolve error message responded by Blue Ocean API and append it into error #18

@JohnNiang

Description

@JohnNiang

In BlueOcean RESTful API documentation, there contains a Error Message section that describes error details when something goes wrong.

{
  "message" : "Failed to create Git pipeline: demo",
  "code" : 400,
  "errors" : [ {
    "message" : "demo already exists",
    "code" : "ALREADY_EXISTS",
    "field" : "name"
  } ]
}

But Jenkins Client don't include the JSON response into error detail or resolve the JSON response.

Therefore, the only feedback to invoker is unexpected status code: 400 instead of demo already exists.

At last, if we resolved this the error message responded by Blue Ocean API and append it into error, invoker would know what happended just now.

Originally posted by @JohnNiang in kubesphere/ks-devops#219 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions