feedhenry / fh-fhc

FeedHenry CLI, the Command Line Interface to FeedHenry
Other
26 stars 66 forks source link

Improve 'target' command #3

Closed dberesford closed 12 years ago

dberesford commented 12 years ago

Feedback from Joe below:


Hi Damien,

If you do fhc target demo.feedhenry.com

It says successfully targeted. But if you try and login it bails out with the error below. I then changed the fhc target command to https://demo.feedhenry.com and it worked. Might be better to reject the target command if the https:// prefix is not present or silently add it in if its missing.

Joe.

Shanktop:~ jdrumgoole$ fhc login fhdemo3@example.com password123 fhc WARN No protocol? { pathname: '/box/srv/1.1/act/sys/auth/login', fhc WARN No protocol? path: '/box/srv/1.1/act/sys/auth/login', fhc WARN No protocol? href: '/box/srv/1.1/act/sys/auth/login' } fhc ERR! login response Error: undefined log message fhc ERR! login response at log (/usr/local/lib/node_modules/fh-fhc/lib/utils/log.js:111:11) fhc ERR! login response at Function.verbose (/usr/local/lib/node_modules/fh-fhc/lib/utils/log.js:56:39) fhc ERR! login response at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:47:9 fhc ERR! login response at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:37:18 fhc ERR! login response at ClientRequest.cb (/usr/local/lib/node_modules/fh-fhc/lib/utils/request.js:44:9) fhc ERR! login response at ClientRequest.emit (events.js:67:17) fhc ERR! login response at Socket. (http.js:1114:11) fhc ERR! login response at Socket.emit (events.js:67:17) fhc ERR! login response at Array.0 (net.js:301:25) fhc ERR! login response at EventEmitter._tickCallback (node.js:192:40) fhc ERR! login Error: undefined log message fhc ERR! login at log (/usr/local/lib/node_modules/fh-fhc/lib/utils/log.js:111:11) fhc ERR! login at Function. (/usr/local/lib/node_modules/fh-fhc/lib/utils/log.js:56:39) fhc ERR! login at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:48:9 fhc ERR! login at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:37:18 fhc ERR! login at ClientRequest.cb (/usr/local/lib/node_modules/fh-fhc/lib/utils/request.js:44:9) fhc ERR! login at ClientRequest.emit (events.js:67:17) fhc ERR! login at Socket. (http.js:1114:11) fhc ERR! login at Socket.emit (events.js:67:17) fhc ERR! login at Array.0 (net.js:301:25) fhc ERR! login at EventEmitter._tickCallback (node.js:192:40) fhc ERR! Error: undefined Could not login! fhc ERR! undefined fhc ERR! at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:49:15 fhc ERR! at /usr/local/lib/node_modules/fh-fhc/lib/utils/fhlogin.js:37:18 fhc ERR! at ClientRequest.cb (/usr/local/lib/node_modules/fh-fhc/lib/utils/request.js:44:9) fhc ERR! at ClientRequest.emit (events.js:67:17) fhc ERR! at Socket. (http.js:1114:11) fhc ERR! at Socket.emit (events.js:67:17) fhc ERR! at Array.0 (net.js:301:25) fhc ERR! at EventEmitter._tickCallback (node.js:192:40) fhc ERR! fhc ERR! System Darwin 10.8.0 fhc ERR! command "node" "/usr/local/bin/fhc" "login" "fhdemo3@example.com" "password123" fhc ERR! fhc ERR! Additional logging details can be found in: fhc ERR! /Users/jdrumgoole/fhc-debug.log fhc not ok

dberesford commented 12 years ago

Resolved in the following commits: commit bbf650240760ce595429e6a5514bc2529258ae62 commit d19e455cc09962709881dd4e430ef6f16d2ab7cc