3 weeks ago
I have an application I'm working on that connects to the SAP Incentive Management OData APIs (Kubernetes) API. I'm bringing back the first 100 rows of the Incentive Management Pipelines.
In Postman, the first 2 PipelineRunSeq values are 20547673299878036 and 20547673299878035.
In my application, I have a TypeScript file that is supposed to retrieve the same 100 Pipelines. The first 2 PipelineRunSeq values are 20547673299878036 and 20547673299878036. The other values of the first item returned match the values of 20547673299878036 in Postman. The other values of the second item match the values of 20547673299878035 in Postman.
The next 5 rows from the response in the application have 20547673299878030 as the PipelineRunSeq but the other values match the values in Postman for 20547673299878034, 20547673299878033, 20547673299878032, 20547673299878031 & 20547673299878030.
I'm stumped as to why the PipelineRunSeq is being returned in this way from within the TS script.
Any ideas and/or suggestions would be greatly appreciated.
Thanks in advance!
Ron
So I found out from one of the people who actually work on that API, that there seems to be an issue with the JSON.parse function for big numbers. (Who knew?)
She suggested a code change and it works. So instead of having this:
const data = await apiResponse.json();
const res= JSON.parse(data);
She told me to use this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.