Even more Debugging for issue #2
Prints the Raw Body and Error in to the Main console.
This commit is contained in:
parent
7b3edd95f9
commit
a81e43fd2c
|
@ -30,6 +30,7 @@ module.exports = function PlexServer(){
|
||||||
|
|
||||||
//Functions
|
//Functions
|
||||||
this.hitApi = function(command,params,connection,callback){
|
this.hitApi = function(command,params,connection,callback){
|
||||||
|
var that = this
|
||||||
console.log('Hitting server ' + this.name + ' via ' + connection.uri)
|
console.log('Hitting server ' + this.name + ' via ' + connection.uri)
|
||||||
if (connection == null){
|
if (connection == null){
|
||||||
if (this.chosenConnection == null){
|
if (this.chosenConnection == null){
|
||||||
|
@ -56,6 +57,11 @@ module.exports = function PlexServer(){
|
||||||
//console.log('Hitting server ' + this.name + ' with command ' + command)
|
//console.log('Hitting server ' + this.name + ' with command ' + command)
|
||||||
//console.log(options)
|
//console.log(options)
|
||||||
request(options, function (error, response, body) {
|
request(options, function (error, response, body) {
|
||||||
|
console.log('Raw response back from the PMS Server ' + that.name + ' is below')
|
||||||
|
console.log('Body VVV')
|
||||||
|
console.log(body)
|
||||||
|
console.log('Error VVV')
|
||||||
|
console.log(error)
|
||||||
if (!error) {
|
if (!error) {
|
||||||
safeParse(body, function (err, json){
|
safeParse(body, function (err, json){
|
||||||
if (err){
|
if (err){
|
||||||
|
|
Loading…
Reference in New Issue