Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error message returned if subscription period has ended #257

Open
javabudd opened this issue Oct 29, 2019 · 3 comments
Open

No error message returned if subscription period has ended #257

javabudd opened this issue Oct 29, 2019 · 3 comments

Comments

@javabudd
Copy link

javabudd commented Oct 29, 2019

The QuickBooksOnline\API\Core\Http\Serialization\XmlObjectSerializer::Deserialize() method returns NULL if Fault is equal to the XML objects name (line 245). This then prevents any future access to the error message.

$oneXmlElementName = (string)$oneXmlObj->getName(); if ('Fault'==$oneXmlElementName) { return null; }

Contents of $oneXmlObj:
object(SimpleXMLElement)#2962 (2) { ["@attributes"]=> array(1) { ["type"]=> string(15) "ValidationFault" } ["Error"]=> object(SimpleXMLElement)#3118 (3) { ["@attributes"]=> array(2) { ["code"]=> string(4) "6190" ["element"]=> string(0) "" } ["Message"]=> string(22) "Invalid Company Status" ["Detail"]=> string(322) "Subscription period has ended or canceled or there was a billing problem : You can't add data to QuickBooks Online Essentials because your trial or subscription period ended, you canceled your subscription, or there was a billing problem. To update your subscription, click the gear icon and view your account information." } }

Expected results: The error message should be accessible to library consumers
Actual results: The error message is not accessible

@bsivalingam
Copy link
Contributor

@javabudd Thanks for bringing this to my attention. I will add a story to my the backlong, meanwhile if you have a fix, please send a PR.

@javabudd
Copy link
Author

javabudd commented Apr 6, 2020

I'll work towards getting a PR this week

@abisalehalliprasan
Copy link
Collaborator

Opening up our SDK for hacktoberfest contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants