on 2024 Aug 08 9:59 AM
Hi Team,
I am trying to alter a SQLQuery as follows:
Patch Endpoint: https://<ip server>:50000/b1s/v1/SQLQueries('AquisitionCosts')
Body:
{
"SqlCode": "AquisitionCosts",
"SqlName": "AquisitionCosts",
"SqlText": "select ItemCode, sum(APC) as APC from (select distinct ItemCode, TransType, APC from FIX1 where TransType in (110, 115, 120)) as v1 where ItemCode like '_________________' group by ItemCode"
}
<head>
<title>502 Proxy Error</title>
</head>
<body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request
<p>Reason: <strong>Error reading from remote server</strong></p>
</p>
</body>
</html>
Hi
To resolve the 502 Proxy Error:
Validate SQL Query: Ensure the SQL query works directly in the database.
Check Endpoint and Authentication: Confirm the URL and authentication details are correct.
Review Server and Proxy Settings: Check server and proxy configurations for issues.
Simplify Query: Test with a simpler query to see if the issue is related to query complexity.
sample example:
Testing with Simplified Query:
SELECT ItemCode, COUNT(*) FROM FIX1 WHERE TransType IN (110, 115, 120) GROUP BY ItemCode
Example of Modified Request Body: Here's how you can format a simplified request body for testing:
{
"SqlCode": "AquisitionCosts",
"SqlName": "AquisitionCosts",
"SqlText": "SELECT ItemCode, SUM(APC) AS APC FROM (SELECT DISTINCT ItemCode, TransType, APC FROM FIX1 WHERE TransType IN (110, 115, 120)) AS v1 GROUP BY ItemCode"
}
By following these steps, you should be able to identify the root cause of the 502 Proxy Error and take appropriate actions to resolve it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.