ListAgent.GetAllLegalBaseAsync fails with InternalServerError

lock
push_pin
done
Answered
3

Hi, we are trying to use the SuperOffice.WebApi.Agents.ListAgent to get all legal bases using the following call:

new SuperOffice.WebApi.Agents.ListAgent(webApiOptions).GetAllLegalBaseAsync()

However, we get an error:

SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiException: InternalServerError Internal Server Error
   at SuperOffice.WebApi.Agents.AgentBase.ThrowOnResponseError(HttpRequestMessage request, HttpResponseMessage response)

...

The following call for the GetConsentPurposesAsync method using the same webApiOptions works perfectly:

new SuperOffice.WebApi.Agents.ListAgent(webApiOptions).GetConsentPurposesAsync()

Any ideas?

23 Jul 2024 | 08:01 AM

All Replies (3)

Hi Dmitry,

Isn't what you really want are the LegalBase items, and therefore use GetLegalBasesAsync instead?

Best regards.

24 Jul 2024 | 10:58 AM

Hi Tony,

GetLegalBasesAsync indeed works. Does it mean that GetAllLegalBaseAsync is deprecated? It still exists in the client but is missing in the documentation.

24 Jul 2024 | 02:38 PM
I think it's a bug... either in the code generator... or just misconfigured in the model. The methods GetAllConsentSourceAsync and GetAllLegalBaseAsync do not have a backing implementation.

25 Jul 2024 | 10:32 AM

Add reply