My Products
Help
Dante Cavallin
CONTRIBUTOR *

Error when getting InventoryTransfers using the GetAll endpoint

by Dante Cavallin

Hi I am getting a very strange error when getting InventoryTransfers via the GetAll endpoint:

 

{"message":"VismaId: a5017f3f-e4c9-457b-8087-b5c213202184. The offset specified in a OFFSET clause may not be negative."}

 

What does this mean ?

 

 

5 REPLIES 5
Dante Cavallin
CONTRIBUTOR *

by Dante Cavallin

I do still think this is a bug in the API, the API should never return 500 errors, ths should be handled on the serverside and then returned as a Bad Request.

Dante Cavallin
CONTRIBUTOR *

by Dante Cavallin

Hi, this is when I do the following query :

https://integration.visma.net/API/controller/api/v1/inventoryTransfer?lastModifiedDateTime=2023-06-0... 15%3A27%3A16.536&lastModifiedDateTimeCondition=>%3D

But it seems to work when I add pageNumber and pageSize

 

 

Accepted solution
Yıldırım
VISMA

Apparently there is an issue with default Get All request, perhaps it might lead to a timeout if there are too many records. However, we always recommend using Get All requests with parameters to limit the data scope. 

Dante Cavallin
CONTRIBUTOR *

Yes but as you saw in my first answer I do use parameters to limit the data scope and it was then I got the error, what I think you should do is to never return 500(Internal server error) error messages out to the API, in this case you should catch these errors on the serverside and reformat the error so that we who use the API can easier figure out for ourself what has gone wrong.

Accepted solution
Yıldırım
VISMA

by Yıldırım

Hi Dante, this seems like related to SQL query. Do you constantly receive the same error when you try to Get All ? 
Could you try using  pageNumber, pageSize parameters ?