Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JohnNiang opened this issue Sep 3, 2021 · 0 comments

Comments

@JohnNiang
Copy link
Member

JohnNiang commented Sep 3, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant