Hello,
I’ve encountered a something really strange error.
I found:
line_Items → sellable → stock_entries
SKU: !M-COT-120x60-WH
Stock Entries → id → 5522702
“sellable_on_hand_value”: Infinity
which make order json invalid.
Do you please check what’s wrong with that?
phil
May 5, 2018, 8:50am
2
Please can you provide the full JSON response?
Hey Phil,
I sent you email which have full Json and API url too.
phil
May 5, 2018, 9:07am
4
Thanks @techosunny I’ll try and take a look this weekend but it is a bank holiday in the UK so might not be able to get a full response until Tuesday
I’m looking forward to your response.
Please do let me know If you find something.
Thanks
phil
May 8, 2018, 7:08am
6
Thanks for sending across the JSON. I’ll discuss this with out developers today.
What problems is the invalid JSON causing precisely? This is important in order to ensure that the bug fix is prioritised correctly.
Thanks phil,
Please let me know when you fixed this.
phil
May 9, 2018, 6:13pm
8
Hi Sunny,
Please can you clarify exactly what issues the invalid JSON is causing.
This is important in order to ensure that the bug fix is prioritised correctly.
This value of sellable on hand value making JSON Invalid.
“sellable_on_hand_value”: Infinity
For more reference,
opened 08:55AM - 10 Mar 14 UTC
closed 05:10AM - 14 Aug 14 UTC
Our graphite system was recently given an infinite value by one of its clients. … Our frontend fetches data the data in JSON format and renders it -- but as a result of the infinite value, the JSON payload is now invalid and our jQuery getJSON fetches no longer complete.
A sample of the invalid data can be seen here (7th entry in the array)
[{"target": "Load", "datapoints": [[0.611111, 1394152815], [0.777778, 1394152830], [0.5, 1394152845], [0.75, 1394152860], [0.666667, 1394152875], [0.666667, 1394152890], [Infinity, 1394152905], [null, 1394152920], [null, 1394152935], [null, 1394152950], [0.75, 1394152965], [0.8, 1394152980], [0.772727, 1394152995], [0.75, 1394153010], [0.75, 1394153025], [0.75, 1394153040], [0.75, 1394153055], [0.75, 1394153070], [0.6875, 1394153085], [0.75, 1394153100]]}]
Fetched from $GRAPHITE_BACKEND/render/?width=586&height=308&_salt=1394441084.732&from=16%3A40_20140306&until=16%3A45_20140306&target=Load&format=json
jsonpp confirms the validation error:
ERROR: Broken json on line 1, char 172: invalid character 'I' looking for beginning of value
Context: ...1394152890], [Infinity, 139415...
phil
May 10, 2018, 6:13am
10
I understand that it makes the JSON invalid, but are you running it through a JSON parser that fails or does you code throw an error because of it?
Actually JSON parser failed and it’s return NULL.
phil
May 10, 2018, 6:44am
12
Understood, thanks.
This appears to be a Veeqo bug, as such I have created bug ticket and linked it to a support ticket which you should have had an email about.
You’ll be updated in that email thread when the bug is fixed.
Yes, I received email about it and thanks for letting me know.