PyYoshi / slack-dump

Export History For Channel, Private Group and Direct Message From Slack
Apache License 2.0
28 stars 18 forks source link

change error message #3

Open kurehajime opened 5 years ago

kurehajime commented 5 years ago

change invalid token error message. because invalid token error is output even if network error.

[before] if invalid token and online.

$./slack-dump -t=INVALID_TOKEN
->ERROR: the token you used is not valid...

if valid token and offline.

$./slack-dump -t=VALID_TOKEN
->ERROR: the token you used is not valid...

[after] if invalid token and online.

$./slack-dump -t=INVALID_TOKEN
->ERROR: Authentication failed.(invalid_auth)

if valid token and offline.

$./slack-dump -t=VALID_TOKEN
->ERROR: Authentication failed.(Post https://slack.com/api/auth.test: dial tcp: lookup slack.com: no such host)

無効なトークンによるエラーとネットワークエラーの切り分けができればありがたいな、という趣旨のプルリクエストです。