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

Errors returned from interactive emp run's are ugly #795

Closed
ejholmes opened this issue Apr 22, 2016 · 3 comments
Closed

Errors returned from interactive emp run's are ugly #795

ejholmes opened this issue Apr 22, 2016 · 3 comments

Comments

@ejholmes
Copy link
Contributor

ejholmes commented Apr 22, 2016

$ emp run bash -a does-not-exist-app
{"id":"not_found","message":"Request failed, the specified resource does not exist","url":""}
@ejholmes ejholmes added the bug label Apr 22, 2016
@ejholmes
Copy link
Contributor Author

For the record, this happens because we don't check the Content-Type header here.

ClientConn.Do returns an *http.Response. If the Content-Type header is applciation/json then we should just do normal decoding. If it's application/vnd.empire.raw-stream, then we should do the io.Copy.

@ejholmes
Copy link
Contributor Author

The other bug here is that, when this happens the command gets "stuck" and never returns. You can find the process and kill it (killall emp), but then your terminal is stuck because apparently the defer to reset the terminal never gets run. Then you have to $ reset the terminal.

/cc @bmarini

@ejholmes
Copy link
Contributor Author

ejholmes commented May 5, 2016

Fixed in #816

@ejholmes ejholmes closed this as completed May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants