Web Connection
Response from timeout in REST API
Gravatar is a globally recognized avatar based on your email address. Response from timeout in REST API
  Ricardo Molina
  All
  May 11, 2017 @ 04:21am

I have written a REST API process (WWC_RESTPROCESS), where there are no web pages involved.

Once, the client got a status code of 500 and a "Request Timeout" page with text "This request took longer than the alotted timeout interval and was aborted"

My question is where can I trap this error and return JSON instead as the client does not want any HTML in the response body.

Thanks,
Ricardo

Gravatar is a globally recognized avatar based on your email address. re: Response from timeout in REST API
  Rick Strahl
  Ricardo Molina
  May 11, 2017 @ 11:29am

Unfortunately you can't - this is generated as part of the system processing in the Web Connection Connector. The only way to make this better is to either bump the timeout or - probably a better choice is have your client error handler check for HTML results and either display the HTML somehow or try to parse out error information.

This is true both for Web Connection module errors, or anything that IIS generates (like IIS Server level 500 errors).

+++ Rick ---

© 1996-2024