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

UnexpectedValueException #5

Open
bjhijmans opened this issue May 5, 2022 · 1 comment
Open

UnexpectedValueException #5

bjhijmans opened this issue May 5, 2022 · 1 comment

Comments

@bjhijmans
Copy link

As of May 3rd, I am getting frequent UnexpectedValueExceptions from updateAccounts. with the following message:

"Sharpspring REST API interpreter failure while evaluating object-level error(s): the number of objects provided to the call (1) is different from the number of objects returned in the 'result' part of the response (0).\nResponse result for updateAccounts call: []"

As far as I can tell, the accounts in question have been successfully updated. My guess is it's a change in the SharpSpring API, but I haven't been able to find any information on it. There have been no changes on my side, and it's happening for two separate SharpSpring setups.

@rmuit
Copy link
Owner

rmuit commented May 6, 2022

From reading the code (tracing the error message you get), it looks like

You should probably try to either comment out that line 504 and see what happens, or just throw an exception right before that line, which includes json_encode($response['error']) (or json_encode($response)).


* I agree it must be a change in the Sharpspring API in the past 5 years. Or there's a situation I have never encountered myself which challenges the assumptions I made while writing the code.

Arguably it looks like I should not have created a situation where the original $response['error'] was not output. But I would have to dive back into the 5 year old code to see exactly what and why, which could be time consuming because of me discovering more API changes to take into account... (and because I don't have access to a Sharpspring API account currently). So I'm guessing noone wants to pay for that.

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

No branches or pull requests

2 participants