My Products
Help
KonsultVn
CHAMPION ***

Customer invoice POST - Object reference not set to an instance of an object

by KonsultVn (Updated ‎10-03-2023 12:13 by Magnus Johnsen VISMA )

Hi,

We have some problems with unclear "Object reference"-error messages in some cases when we create a customer invoice through POST endpoint: https://integration.visma.net/API/controller/api/v2/customerinvoice


This is the error we get back as a response.

 

Exception message: requestUri: controller/api/v2/customerinvoice / method: post / headers: Content: application/json Authorizationapplication-type: Visma.net Financials ipp-company-id: 4513133 / response content: {"message":"VismaId: 67d82f84-31f0-4190-b377-e0e0147dc969. Object reference not set to an instance of an object."}

 

Many of these errors are due to a user entering a country and a postal code in another system that does not match Visma's register. It would be very beneficial for us and our customers if we could get back an error message which explains what the problem is due to, instead of above.

Could you help us here?

 

Thanks in advance!

 

 

5 REPLIES 5
KonsultVn
CHAMPION ***

by KonsultVn

Im not able to edit above post, could you help me remove the bearer token ASAP?

by Magnus Johnsen

It was removed

KonsultVn
CHAMPION ***

by KonsultVn

Yes Magnus, it is fixed.
Can you help me look into the case above regarding the possibility of receiving better error messages than "Object reference not set to an instance of an object."?

 

This type of NullReferenceException should, in my opinion, be handled by the api.

 

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

Yes we'll report it to the development team.

We agree with you, this should be clearer and be handled internally.

Thank you.

KonsultVn
CHAMPION ***

by KonsultVn

This token above is now removed andcan no longer be used.