Home > Forum > Known bugs > KSeF Connector | v2.0.0.22 – ksefData returns 406 when payment method is filled

KSeF Connector | v2.0.0.22 – ksefData returns 406 when payment method is filled

Hi everyone,

Has anyone experienced a similar issue in the latest WEBCON KSeF Connector v2.0.0.22?

For some incoming invoices (from KSeF) the endpoint: /api/data/v1/in/invoices/{id}/ksefData returns 406 Not Acceptable (empty response). In older API version it returns 500 Internal Server Error with:
System.NullReferenceException: Object reference not set to an instance of an object

Stack trace points to payment method mapping:
WebCon.KSEF.Core.Logic.Tools.Invoice.XMLFieldsGetter.GetChoiceFirstOfType[T](Array items)
FormaPlatnosciGetter(...)

What’s strange is that whenever the payment method (Forma płatności) is filled in, the ksefData endpoint returns 406. If the payment method is empty, the invoices are processed correctly and everything works fine.
Did anyone already solve this in v2.0.0.22?

Thanks!