I am using guzzle to test upload products with the Magento API. Whenever I run this script:
<?php
require_once ('connparams.php');
try {
$response = $client->request('post', 'products',
[
"headers" => $headers,
'body' => json_encode([
'product' =>
['attribute_set_id' => 13],
['sku' => 12548],
['name' => 'widget'],
['price' => 1],
['type_id' => 'simple']
])
]);
}
I get the following error (which I'm outputting to a txt file with the catch block):
ERROR at: 06:50:15 pm | 500 | Internal Server Error | An error has happened during application run. See exception log for details.
When I check the exception log in Magento, there is not a new entry. There are entries for exceptions when I test the API with swagger.
source https://stackoverflow.com/questions/69382003/magento-api-throws-500-error-says-check-exception-log-but-nothing-is-there
Comments
Post a Comment