I'm migrating a bunch of xmlrpc API code from magento1 to the rest API in magento two, and was wondering if anyone knew the correct way to return API errors. Previously we would've been throwing a Mage_Api_Exception, but I haven't been able to find the matching magento 2 classes

  • Any solution for this question? – Sunil Kumar Aug 24 '16 at 13:53
  • @SunilKumar I never got a conclusive answer but I think generally speaking you want to throw a LocalizedException or something that subclasses it. Hope that helps – Pat Marx Aug 24 '16 at 23:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.