Announcements
No record found.
I'm starting to work with AIF and is working fine, but I have some doubts to treat the errors. The integration is working with Swagger (C#) and to create, delete, find is working well. But, when I try to find or delete an order that is not exists, show the error "ExceptionMessage": "Object reference not set to an instance of an object.". Anyone knows how can I treat it? I want that return a message like "Order does not exist". Need I treat it in AIF or C#?
Thanks!
AIF returns what it returns, so you should handle it in C#.
If you try to delete an order and get this error message, then you can return your own error message to the user of your code.
Do you get the message from a NullReferenceException in your client code or in a FaultExeption returned by the remote service? In either case, you'll need to find where it's coming from, but you'll be looking into a different application in each case.
By the way, Swagger toolset contains quite a few things; it sounds like you're using a C# code generator. If it's relevant to the problem, please give us more details about what you did.
Hi Martin,
I solved the problem using the array list. When the list is empty or null, they return the value that I want.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 681
André Arnaud de Cal... 446 Super User 2026 Season 1
Syed Haris Shah 202 Super User 2026 Season 1