My Products
Help
adrianm
PARTNER

Confusing error from customerinvoice v2 endpoint

by adrianm

This message confused me for some time.

 

{"message":"Error: Inserting 'Sales invoice/note' record raised at least one error. Please review the errors.\r\nDid not find a financial period that matches the selected Date.\r\nThe customer of the specified project does not match the customer on the document.\r\n"}

 

The real error is the first one "Did not find a financial period that matches the selected Date". The second message is wrong. Same project works fine if there is a valid financial period.

2 REPLIES 2
adrianm
PARTNER

by adrianm

You are right. I get the customer mismatch error in the UI when entering the project number.

 

It is wrong there as well of course so the problem is not in the api.

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

What happens if you try to enter the document in the UI, but still in a financial period that is not valid?

Does it trigger the same error?

We agree that this part of the error should not be included in the response, for some reason, warnings in the UI are also included in the error when encountering an actual error.