You're viewing Apigee Edge documentation.
Go to the
Apigee X documentation. info
Symptom
Error encountered when making a live API request using SmartDocs from the developer portal.
Error Messages
The common error seen on Developer Portal is “An internal error has occurred. Please retry your request”.
Possible Causes
This error can occur when Developer Portal fails to get a response from the backend (smartdocs proxy or the actual endpoint).
Diagnosis
Enable “Developer tools” in your browser and check the network tab to identify the actual error.
Common errors and their typical causes are listed in the following table:
Error |
Typical Cause(s) |
ERR_NAME_NOT_RESOLVED |
SmartDocs proxy misconfigured or network firewall restrictions |
Mixed Content |
|
500 - Internal Server Error |
Let’s go through each of these causes one by one and steps to resolve the issue.
SmartDocs proxy misconfigured or network firewall restrictions
The“ERR_NAME_NOT_RESOLVED” message indicates that the smartdocs proxy url is misconfigured or the network from which the portal is being accessed is unable to make a call to the smartdocs proxy URL due to firewall restrictions. The smartdocs proxy must be accessible from the internet or from the internal network (for internal APIs).
Resolution
Ensure that the smartdocs proxy can be accessed from all required networks by deploying the smartdocs proxy to a virtual host on Edge with a hostname that is accessible from internet.
Portal configured over HTTPS, SmartDocs request over HTTP
The “Mixed Content” error indicates that smartdocs proxy is being called over HTTP from a page loaded over HTTPS.
Resolution
Expose smartdocs proxy over https to resolve the issue. You can do so by deploying the smartdocs proxy to include a virtual host configured to use TLS/SSL (typically the “secure” virtual host).
SmartDocs proxy returning an exception
The 500 - Internal Server Error message can be caused by an issue with the “smartdocs” proxy. In this case, you notice that the smartdocs proxy returns this error.
Diagnosis
Use the Trace tool to diagnose errors with the “smartdocs” proxy, as described below. For more information, see Using the Trace tool.
- Enable trace for the “smartdocs” Proxy in the “VALIDATE” org to locate the specific policy that is returning the 500 Internal Server Error.
- Select the specific policy in the trace to identify the cause of the error.
Resolution
Fix the error identified. If you need assistance, contact Apigee Edge Support.
Edge Message Processors unable to call published API endpoint
500 - Internal Server Error can also occur when the Message Processors belonging to the org hosting the Smartdocs proxy are unable to call the API endpoint.
Diagnosis
Use the Trace tool to diagnose errors with the “smartdocs” proxy, as described below. For more information, see Using the Trace tool.
- Enable trace for the “smartdocs” proxy in the “VALIDATE” org to locate the specific policy that is returning the 500 Internal Server Error.
- In the sample UI trace shown above, it is seen that the JavaScript policy “BuildTargetAPIRequest” is failing to execute the target URL.
- Obtain the target URL from the JavaScript policy “BuildTargetAPIRequest”.
- Make a direct call to the URL from the Message Processor nodes associated with
“VALIDATE” org as shown below:
curl -v <target URL>
- Correct any observed error.
Resolution
- Ensure that APIs published on Developer Portal can be invoked from Message Processors associated with the “VALIDATE” org and correct any errors encountered.
- If you are able to execute the API call directly from the Message Processor, it’s very likely that you should be able to execute the API through SmartDocs as well.
- Execute the API call through SmartDocs and check if the issue is fixed.