PHP PrestaShop Webservice language resource error - prestashop

I am using platform webservice (1.6) and I don't have problems accessing to categories, products resources but when I try to access languages resource I got error.
Also with a direct request about schema/synopsis I got error.
Example:
aut_key#127.0.0.1/presta/api/products?schema=synopsis I got extended schema information
aut_key#127.0.0.1/presta/api/languages?schema=synopsis I got following
"Internal error. To see this error please display the PHP errors."
Setting debug mode I got:
Fatal error: Uncaught exception 'PrestaShopWebserviceException' with message 'This call to PrestaShop Web Services failed and returned an HTTP status of 401. That means: Unauthorized.' in C:\Ampps\www\test\PSWebServiceLibrary.php:92 Stack trace: #0 C:\Ampps\www\test\PSWebServiceLibrary.php(296): PrestaShopWebservice->checkStatusCode(401) #1 C:\Ampps\www\test\presta.php(93): PrestaShopWebservice->get(Array) #2 {main} thrown in C:\Ampps\www\test\PSWebServiceLibrary.php on line 92
Status 401. Unauthorize doesn't make any sense since if I try to get orders schema with same settings no errors.
Any idea?
I am using following official PSWebServiceLibrary
https://raw.github.c...viceLibrary.php
Thank you

Related

How to fix “Failed to load resource: the server responded with a status of 502(). Using Nuxt.js

An error occurred with this application.
This is an error with the application itself, not the platform.
502: BAD_GATEWAY
Code: NO_STATUS_CODE_FROM_LAMBDA
ID: iad1:wxl75-1560370905627-90a165b2829d
Check https://vercel.com/knowledge/how-to-debug-a-502-error. A 502 error is always caused by a code problem that you need to look into.

The CGI application did not return a valid set of HTTP errors. 502.3 - Bad Gateway: Forwarder Connection Error (ARR) on Azure ASP.NET Core App

All of a sudden we are seeing this random error / exception in our web application.
Failed to load resource: the server responded with a status of 502 (Bad Gateway).
In the Log Stream, we are seeing the following details, with specific error code as 502.3 - Bad Gateway: Forwarder Connection Error (ARR).
Also, sometimes in the browser itself we see "The CGI application did not return a valid set of HTTP errors." getting displayed.
Most of the searches for these error codes refer to "IIS / Proxy Server" configuration. But, we haven't changed any such settings.
The error happens very randomly and not specific to any user action/function. Same functionality works first and on second execution immediately after first one throws this error.
How to figure out what is causing this and how to fix?
I google this question, because the program was normal at the beginning, and the subsequent 502.3 error. After I checked the information on the Internet, I feel that it can only give us an inspiration, and it cannot solve your problem immediately.
So my suggestion is that first you browse post1 and post2 I provided.
Next, proceed to Troubleshoot according to the steps of the official documentation. Specific errors require specific analysis.

How to get proper https server response in apache camel DSL?

I am trying to hit https server using https4 component I want to get whatever response the server throwing it maybe success or failed here is my route.
from("direct:start")
.setHeader(Exchange.HTTP_QUERY,constant("USERNAME=__&PASSWORD=__"))
.to("https4://someAddress.com/api/controls/uploadAndImportFileFromCSV")
.to("stream:out");
Output I'm getting:
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-rajat-Lenovo-G50-70-1513247400372-0-1]
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1847)
.........
Caused by: org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking https4://someAddress.com/api/controls/uploadAndImportFileFromCSV?USERNAME=__&PASSWORD=__ with statusCode: 599
But whenever I hit this URL on web browser I am getting the accurate response what server throws
like {"sessionId":"2985416A1F1122694031261B55F0277F.jvm1","_ERROR_MESSAGE_LIST_":[" The following required parameter is missing: [IN]uploadAndImportFile.configId]","The following required parameter is missing: [IN][uploadAndImportFile.fileTypeEnumId]"],"removePathAlias":false,"loggedIn":true,"USERNAME":"admin","_LOGIN_PASSED_":"TRUE","webSiteId":"API"}
This is what I want to get from camel
After a brief browsing about camel exception randomly I got my solution is already clearly mention on org.apache.camel.http4.
If throwExceptionOnFailure=false the HttpOperationFailedException will not be thrown for failed response codes. This allows you to get any response from the remote server.
from("direct:start")....to("https4://.......?throwExceptionOnFailure=false")

Transaction refused because of an invalid argument. See additional error messages for details (#10004: Internal Error)

I have cloned a Magento CI 1.9.2.3 site and I am getting this Paypal error:
Transaction refused because of an invalid argument. See additional error messages for details (#10004: Internal Error).
The weird thing is that the site it was cloned from works perfectly...
Any ideas would be great.

Error rendering Councillors Online web part: [The remote server returned an error: (400) Bad Request.]

I am implementing a WCF based solution and all was working fine until I started to process larger quantities of data.
The Solution worked well in DEV where we added large quantities of daata when we restored the site to QA we got this error . Error rendering Councillors Online web part: [The remote server returned an error: (400) Bad Request.]
Can anyone propose a solution to this problem?
Thank you
My WCF web.config looks as follows :
========================================================
This error can also come if you WCF Code return error -- Object reference not set to an *instance of an object*
As you can track through Fiddler
{"Detail":"Object reference not set to an instance of an object."}
As you can also user Log to treas it out