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

Error message for server response is not in Json format in 1.2.0 #513

Open
carolwu-1206 opened this issue Jun 17, 2021 · 3 comments
Open
Labels
type/bug Something isn't working

Comments

@carolwu-1206
Copy link

carolwu-1206 commented Jun 17, 2021

Issue Description

bug report

Describe what happened (or what feature you want)

In former version(0.9.0), the error message was in Json format like

{"code":604,"success":false,"error":"adfaefaf process not found exit status 1"}

However, in 1.2.0, it is like

`/opt/chaosblade-1.2.0/blade create process kill --process-cmd adfaefaf`: cmd exec failed, err: {"code":47002,"success":false,"error":"invalid parameter `process-cmd`, `adfaefaf` process not found","result":"invalid parameter `process-cmd`, `adfaefaf` process not found"}

There is no release note explaining reason for this change. The free format response is hard for to parse.

Describe what you expected to happen

Server response error message is in Json format.

How to reproduce it (as minimally and precisely as possible)

http://IP:Port/chaosblade?cmd=create%20process%20kill%20--process-cmd%20adfaefaf
1.
2.
3.

Tell us your environment

Anything else we need to know?

@xcaspar xcaspar added type/bug Something isn't working and removed type/bug Something isn't working labels Jun 17, 2021
@xcaspar
Copy link
Member

xcaspar commented Jun 17, 2021

I tested it but it didn't reproduce the problem.
image

image

@carolwu-1206
Copy link
Author

This issue occurs on server response only
0.9.0
image
0.1.2
image

@xcaspar
Copy link
Member

xcaspar commented Jun 17, 2021

Yes, it's a bug. I will fix it in the next version.

@xcaspar xcaspar added the type/bug Something isn't working label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants