Skip to content

EOF error on delete - #559

Open
breardon2011 wants to merge 1 commit into
mainfrom
user-bugs
Open

EOF error on delete#559
breardon2011 wants to merge 1 commit into
mainfrom
user-bugs

Conversation

@breardon2011

Copy link
Copy Markdown
Contributor

oc exec kill prints "Error: EOF" even though the server killed the session cleanly — the kill endpoint returns 204 No Content, but Client.Get/Post/Patch/PutJSON always call json.Decode(result), which returns io.EOF on an empty body.

Added a decodeIfBody(resp, result) helper: no-op when status is 204/205 or Content-Length is 0, else decode as before. Applied to all four methods.

Verified on dev: oc exec kill sb-… sess-… now prints "Session … killed" and exits 0.

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

Successfully merging this pull request may close these issues.

1 participant