slackcat icon indicating copy to clipboard operation
slackcat copied to clipboard

Printing actual http error, closing response body

Open bobrik opened this issue 10 years ago • 1 comments

Before:

2014/05/21 18:33:21 Post failed: Not OK

After:

2014/05/21 18:37:00 Post failed: Not OK: 500, No text specified

Also, response body should be closed since it is io.ReadCloser.

Probably you should update readme too, following files with empty lines will cause http error 500:

tail -F logfile | slackcat

will trigger error above, when:

tail -F logfile | grep --line-buffered -v '^\s*$' | slackcat

will work just fine.

bobrik avatar May 21 '14 14:05 bobrik

I too had to work out the --line-buffered option.

ytjohn avatar Jun 14 '15 13:06 ytjohn