<?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: Why do I get response status 500 when calling a Batch API Macro? in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851263#M25717</link>
    <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13728"&gt;@SASJedi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the note " The quoted string currently being processed....", I suppose it is expected since the macro was copied from the node in the project pipeline. &lt;BR /&gt;&lt;BR /&gt;Anyway, I figured out how to reproduce the error: It happens as soon as I share the Model Studio Project where I got the batch API from with a group. This explains the fact that only a few projects where affected. The private projects are working fine.&lt;BR /&gt;&lt;BR /&gt;It raises the question: is this a limitation or a bug?&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 19:04:14 GMT</pubDate>
    <dc:creator>alisio_meneses</dc:creator>
    <dc:date>2022-12-27T19:04:14Z</dc:date>
    <item>
      <title>Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850794#M25713</link>
      <description>&lt;P&gt;Hello there!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've created pipeline in a Forecasting project in SAS Model Studio and it runs fine. I've downloaded the batch API, put it on a SAS program and set the macro variables, but SAS Studio report an error when I press run. The log shows I am getting a Response status 500 in a PROC HTTP.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've checked the execution log but was unable to extract a clue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone has a hint to why do I get response status 500 when calling a Batch API Macro?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional info:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I'm using a SAS Viya 3.5 environment&lt;/LI&gt;
&lt;LI&gt;The Forecasting project creator and the batch API SAS program creator are the same&lt;/LI&gt;
&lt;LI&gt;SAS programa and log attached (i've remover sensitive information)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 15:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850794#M25713</guid>
      <dc:creator>alisio_meneses</dc:creator>
      <dc:date>2022-12-22T15:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850802#M25714</link>
      <description>&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_server_errors" target="_self"&gt;HTTP Error 500&lt;/A&gt;&amp;nbsp;is a general web server error. I see your code attached, but not the log, so it's difficult to say which of your PROC HTTP steps generated the error.&amp;nbsp; To help troubleshoot, instead of just writing the status code to the log with %PUT, also write the associated text:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put NOTE: &amp;amp;=SYS_PROCHTTP_STATUS_CODE;
%put NOTE- &amp;amp;=SYS_PROCHTTP_STATUS_PHRASE;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you could attach the log here, that would be helpful, too.&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 15:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850802#M25714</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-12-22T15:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850829#M25715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13728"&gt;@SASJedi&lt;/a&gt;, thanks for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with you regarding the 500 error, but the fact that I can run the same pipeline fine from the Model Studio GUI is a bit puzzling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, here you go. The sas with status phrase and log files.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 18:25:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850829#M25715</guid>
      <dc:creator>alisio_meneses</dc:creator>
      <dc:date>2022-12-22T18:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850867#M25716</link>
      <description>&lt;P&gt;Looks like the third PROC HTTP step is the one throwing the error. And just before that step, I see:&lt;/P&gt;
&lt;PRE&gt;NOTE: The quoted string currently being processed has become more than 262 bytes long.  &lt;BR /&gt;You might have unbalanced quotation marks.&lt;/PRE&gt;
&lt;P&gt;Is that expected? If not, the unbalanced quotes may be interfering with the code generated for the subsequent PROC HTTP step.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As an additional troubleshooting technique, I'd run the process with OPTIONS MPRINT set, so you can see the actual generated code, and give that last PROC HTTP step a good look. If you want, you can use the MFILE option to write the code to a separated .sas fille for easier review:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mprint '~/my_generated_code.sas';
options MPRINT MFILE;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 21:55:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/850867#M25716</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-12-22T21:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851263#M25717</link>
      <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13728"&gt;@SASJedi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the note " The quoted string currently being processed....", I suppose it is expected since the macro was copied from the node in the project pipeline. &lt;BR /&gt;&lt;BR /&gt;Anyway, I figured out how to reproduce the error: It happens as soon as I share the Model Studio Project where I got the batch API from with a group. This explains the fact that only a few projects where affected. The private projects are working fine.&lt;BR /&gt;&lt;BR /&gt;It raises the question: is this a limitation or a bug?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 19:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851263#M25717</guid>
      <dc:creator>alisio_meneses</dc:creator>
      <dc:date>2022-12-27T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851830#M25718</link>
      <description>&lt;P&gt;This looks more like a permissions issue than a coding issue - and I'm primarily a code-head.&amp;nbsp; I'm going to move this message stream over to the Administration and Deployment group in hopes of raising your visibility with the SAS Administrators who tend to congregate there.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 14:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851830#M25718</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2023-01-02T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get response status 500 when calling a Batch API Macro?</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851840#M25720</link>
      <description>I would engage SAS Technical Support for this.&lt;BR /&gt;&lt;BR /&gt;A HTTP 500 response should have an associated error in the service that is returning that response. In this case the service serving the /forecastingGateway endpoint. Since this happens as a result of sharing that error might be coming from a failure from another service called by the gatweay, so would require looking at multiple service logs from that time.&lt;BR /&gt;&lt;BR /&gt;You can look for errors in the logs for your microservices that coincide with when you encountered the 500 response.</description>
      <pubDate>Mon, 02 Jan 2023 15:37:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Why-do-I-get-response-status-500-when-calling-a-Batch-API-Macro/m-p/851840#M25720</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2023-01-02T15:37:31Z</dc:date>
    </item>
  </channel>
</rss>

