<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PHP API Exceptions Truncated in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688346#M56573</link>
    <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/199080"&gt;@Nickm66&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 17:46:52 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2022-09-01T17:46:52Z</dc:date>
    <item>
      <title>PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/687027#M56462</link>
      <description>&lt;P&gt;When there's an instance of a property value being invalid, the exception in the PHP API is truncated. See an example below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[400] Client error: `POST https://api.hubapi.com/crm/v3/objects/contacts?hapikey=&amp;lt;redacted&amp;gt;` resulted in a `400 Bad Request` response:
{"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"Email address 69joeblow@ (truncated...)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the API to show the full error on exceptions so I can debug what went wrong with the request?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 17:24:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/687027#M56462</guid>
      <dc:creator>EHowey</dc:creator>
      <dc:date>2022-08-30T17:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/687857#M56528</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/441495"&gt;@EHowey&lt;/a&gt;,&amp;nbsp;thanks for reaching out! Let's see if we can get the conversation started for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/199080"&gt;@Nickm66&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/153634"&gt;@tominal&lt;/a&gt;, do you have any PHP wisdom or troubleshooting thoughts for&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/441495"&gt;@EHowey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you! — Jaycee&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 20:35:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/687857#M56528</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-08-31T20:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688149#M56552</link>
      <description>&lt;P&gt;Hi, not seen this before what is the value of this PHP setting?&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len" target="_blank"&gt;https://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Maybe increase that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're about to look into the whole hubspot API keys to private apps this week, are you aware of this change?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 13:07:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688149#M56552</guid>
      <dc:creator>Nickm66</dc:creator>
      <dc:date>2022-09-01T13:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688201#M56555</link>
      <description>&lt;P&gt;Ah i think this is actually owing to how guzzle (one of the php packages the API uses).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similar issue with a different API, hope this helps:&lt;/P&gt;&lt;P&gt;&lt;A href="https://laracasts.com/discuss/channels/general-discussion/guzzle-error-message-gets-truncated" target="_blank" rel="noopener"&gt;https://laracasts.com/discuss/channels/general-discussion/guzzle-error-message-gets-truncated&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dcblog.dev/solving-guzzle-errors-truncated" target="_blank"&gt;https://dcblog.dev/solving-guzzle-errors-truncated&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 14:21:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688201#M56555</guid>
      <dc:creator>Nickm66</dc:creator>
      <dc:date>2022-09-01T14:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688266#M56562</link>
      <description>&lt;P&gt;The Guzzle library likes to truncate the error response by default.&lt;/P&gt;&lt;P&gt;You can use its accessors to fetch the full response body, as in this forum discussion:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/19748105/handle-guzzle-exception-and-get-http-body" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/19748105/handle-guzzle-exception-and-get-http-body&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is something I have used with the hubspot api:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;try {
    $hubspot_api_response = $hubspot_api_deal_helper-&amp;gt;basicApi()-&amp;gt;create($new_deal_properties);
    if ($hubspot_api_response) {
        $result['success'] = true;
        $result['hubspot_deal_id'] = $hubspot_api_response-&amp;gt;getId();
    }
} catch (\HubSpot\Client\Crm\Deals\ApiException $e) {
    $result['success'] = false;
    $result['messages'][] = $e-&amp;gt;getResponseBody();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 16:12:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688266#M56562</guid>
      <dc:creator>danhammari</dc:creator>
      <dc:date>2022-09-01T16:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688339#M56570</link>
      <description>&lt;P&gt;Beautiful. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 17:39:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688339#M56570</guid>
      <dc:creator>EHowey</dc:creator>
      <dc:date>2022-09-01T17:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: PHP API Exceptions Truncated</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688346#M56573</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92013"&gt;@danhammari&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/199080"&gt;@Nickm66&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 17:46:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/PHP-API-Exceptions-Truncated/m-p/688346#M56573</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-09-01T17:46:52Z</dc:date>
    </item>
  </channel>
</rss>

