My Products
Help
erik-kle
PARTNER

Filter customer on attribute, 500 Internal server error

by erik-kle (Updated ‎02-02-2021 13:41 by Yıldırım VISMA )

When trying to filter customer on attribute, i get response 500. Is this a known bug or im i doing something wrong?

 

https://integration.visma.net/API/controller/api/v1/customer?attributes={"EXID":"97089"}&pageNumber=...

 

Response

<body>
    <h1>HTTP Status 500 - Internal Server Error</h1>
    <hr />
    <p><b>type</b> Exception report</p>
    <p><b>message</b>Internal Server Error</p>
    <p><b>description</b>The server encountered an internal error that prevented it from fulfilling this request.</p>
    <hr />
</body>
10 REPLIES 10

by Magnus Johnsen

Hi,

 

We have been able to reproduce this and will open a case with the development team.

We'll get back to you as soon as we have more information.

Hi,

 

We have checked this, and with encoding it works as expected.

E.g:

Customer?attributes=%7B"Test":"TestValue"%7D

 

Have you recently implemented this, or do you have a date of when it was working for you previously?

 

Thank you. 

erik-kle
PARTNER

by erik-kle

I have used this for a long time, but havent noticed when it stopped working. Im developing a new integration now and during debugging i found it no longer works. 

 

Ill try with endcoding. 

by Magnus Johnsen

Ok, thank you. 

Have you noticed that previous integrations have stopped working? Or is it as of now, only recent testing?

In your previous integrations, do you encode all special characters?

erik-kle
PARTNER

by erik-kle

I have not used encoding for this previously, so other integrations most likely fails because of this. But I use this to find a customer based on an external id, so if this request fails, i create a new customer instead. So everything works, but maybe not in the intended way. No client have yelled at me, yet anyways 🙂

by Magnus Johnsen

Hi,

 

We have checked the logs extensively and it looks like all of your requests when searching for the attribute parameter has been been going through.

 

How many times did you experience this result?

From where did you make this request?

 

In our test we tried this in postman, and we have learned that postman no longer autoencode, which causes this issue as the brackets are now getting rejected by the server. 

erik-kle
PARTNER

by erik-kle

Hi again, returning to this thread when i think i have found the real issue.

 

My url is escaped fine and works: customer?attributes=%7B%22TESTID%22:%221518%22%7D

 

But when applying pagination it no longer works

 

customer?pageNumber=1&pageSize=10&attributes=%7B%22TESTID%22:%221518%22%7D

by Magnus Johnsen

Hi,

 

We have tried this out and can't see any issues:

customer?pageNumber=1&pageSize=100&attributes=%7B%22test%22%3A%22testvalue%22%7D

 

What error are you getting now?

erik-kle
PARTNER

by erik-kle

i get 200 but empty response body

 

[]

 

 

 

 

This is then problem with filtering and pagination -- also described here:

https://community.visma.com/t5/Forum-in-Developers-Visma-net/Issue-with-filtering-of-attributes/m-p/...