5

I was trying to create a new product but some weird problem happened and it simply gave me this error:

Invalid data given. Details in error message.

Which was generated by $e -> getMessage() from this snippet:

try {
    $result = $proxy -> call($sessionId, $api, $parameters);
    return $result;
} catch (SoapFault $e) {
    echo '<p style="color:red;">'.$e -> getMessage().'</p>';
    return false;
}

So where is this "error message"? Thanks!

datasn.io
  • 12,564
  • 28
  • 113
  • 154

2 Answers2

2

Highly recommend TechColins approach for logging all API calls and responses:

Magento API performance issues when doing bulk product updates

http://techcolin.net/2011/11/a-php-proxy-script-for-logging-magento-api-soap-calls/

It will enable you to see exactly what's getting passed to the API and the error magento responds with.

Might seem a bit of extra overhead if you're just looking for a quick fix right now, but will be of massive benefit for diagnosing future issues.

Community
  • 1
  • 1
elMarquis
  • 7,450
  • 4
  • 38
  • 42
2

All Magento log files and reports are placed in the var/ sub directories, these are :

{Mage_path}/var/log
{Mage_path}/var/report

Also check if the configuration is set to output messages in log files ( in System / Configuration / Developer ).

  • Unfortunately the message in the Magento log was just about as useless as the one returned by the Exception in my case. – quickshiftin Apr 24 '15 at 19:22