The credhub debug panics when the response is nil, this is due to the position of the dumpResponse i.e earlier when the API request response has an error, the sequence says to dump the response first which is invalid (since the response is nil or doesn't have any memory address)
This patch changes the order i.e to return the error if there is a error and dump if there is no error. Also added a debug line to print the error for easier debug since the service broker store completely looses the error inflight making it harder to debug
Reopening pull request: https://github.com/cloudfoundry-incubator/credhub-cli/pull/100
The credhub debug panics when the response is
nil
, this is due to the position of the dumpResponse i.e earlier when the API request response has an error, the sequence says to dump the response first which is invalid (since the response is nil or doesn't have any memory address)This patch changes the order i.e to return the error if there is a error and dump if there is no error. Also added a debug line to print the error for easier debug since the service broker store completely looses the error inflight making it harder to debug