Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Cleaned up the bingads error messages on bing reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymarois committed Dec 12, 2019
1 parent e77656e commit c7d335b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

### 12/12/2019 - 1.2.14

#### Changed
* Cleaned up `BingAds` for Soap errors due to request of `__getLastRequest()` undefined errors.

### 11/07/2019 - 1.2.13

#### Added
Expand Down
64 changes: 40 additions & 24 deletions src/Services/BingAds/Reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,16 @@ public function buildFinalUrlReport()
}
catch (SoapFault $e)
{
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);
var_dump($e->detail);
print "-----\r\nLast SOAP request/response:\r\n";
print $this->serviceProxy->GetWsdl() . "\r\n";
print $this->serviceProxy->__getLastRequest()."\r\n";
print $this->serviceProxy->__getLastResponse()."\r\n";
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);

if (isset($e->detail)) {
var_dump($e->detail);
}

// print "-----\r\nLast SOAP request/response:\r\n";
// print $this->serviceProxy->GetWsdl() . "\r\n";
// print $this->serviceProxy->__getLastRequest()."\r\n";
// print $this->serviceProxy->__getLastResponse()."\r\n";
}

return (new ReportDownload($this->serviceProxy, $reportRequestId));
Expand Down Expand Up @@ -373,12 +377,16 @@ public function buildSearchTermReport()
}
catch (SoapFault $e)
{
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);
var_dump($e->detail);
print "-----\r\nLast SOAP request/response:\r\n";
print $this->serviceProxy->GetWsdl() . "\r\n";
print $this->serviceProxy->__getLastRequest()."\r\n";
print $this->serviceProxy->__getLastResponse()."\r\n";
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);

if (isset($e->detail)) {
var_dump($e->detail);
}

// print "-----\r\nLast SOAP request/response:\r\n";
// print $this->serviceProxy->GetWsdl() . "\r\n";
// print $this->serviceProxy->__getLastRequest()."\r\n";
// print $this->serviceProxy->__getLastResponse()."\r\n";
}

return (new ReportDownload($this->serviceProxy, $reportRequestId));
Expand Down Expand Up @@ -431,12 +439,16 @@ public function buildAgeGenderReport()
}
catch (SoapFault $e)
{
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);
var_dump($e->detail);
print "-----\r\nLast SOAP request/response:\r\n";
print $this->serviceProxy->GetWsdl() . "\r\n";
print $this->serviceProxy->__getLastRequest()."\r\n";
print $this->serviceProxy->__getLastResponse()."\r\n";
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);

if (isset($e->detail)) {
var_dump($e->detail);
}

// print "-----\r\nLast SOAP request/response:\r\n";
// print $this->serviceProxy->GetWsdl() . "\r\n";
// print $this->serviceProxy->__getLastRequest()."\r\n";
// print $this->serviceProxy->__getLastResponse()."\r\n";
}

return (new ReportDownload($this->serviceProxy, $reportRequestId));
Expand Down Expand Up @@ -495,12 +507,16 @@ public function buildMostSpecificLocationReport()
}
catch (SoapFault $e)
{
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);
var_dump($e->detail);
print "-----\r\nLast SOAP request/response:\r\n";
print $this->serviceProxy->GetWsdl() . "\r\n";
print $this->serviceProxy->__getLastRequest()."\r\n";
print $this->serviceProxy->__getLastResponse()."\r\n";
printf("-----\r\nFault Code: %s\r\nFault String: %s\r\nFault Detail: \r\n", $e->faultcode, $e->faultstring);

if (isset($e->detail)) {
var_dump($e->detail);
}

// print "-----\r\nLast SOAP request/response:\r\n";
// print $this->serviceProxy->GetWsdl() . "\r\n";
// print $this->serviceProxy->__getLastRequest()."\r\n";
// print $this->serviceProxy->__getLastResponse()."\r\n";
}

return (new ReportDownload($this->serviceProxy, $reportRequestId));
Expand Down

0 comments on commit c7d335b

Please sign in to comment.