Print a JSON when the token is invalid on a API request.
Make CLI compatible with ruby 1.9.3.