[Generic Connector for Multipart/form-data request] [BUG]Object reference not set to an instance of an object
Question
Application Type
Service

Hello there!

I tried to use your component but i get the following error from the extension:

"Object reference not set to an instance of an object." Any idea what i'm doing wrong? 

There's a bug in the (logging part of the) exception handling, which causes another exception. If there is no "innerException" in the original exception, the catch block will always throw the famous "Object reference ..." exception. And since there is no additional logging, you won't be able to figure out the real issue.

After the changes from Tim, i was able to get more information. I had to remove the header parameter"Content-Type" since the extension was building it.

Champion

Sorry for the delayed response  Hope it resolved!!
Is there any change needed in the component, I will do it?

Yes, in the catch block of the MssUpload method, there is a line (LogMessage) that uses "exp.InnerException.Message". And when there is no InnerException, the code crashes and throws another exception.

So in the catch block, there should be a check around the LogMessage call, where you validate "exp.InnerException == null". In that case, you make a simple LogMessage that doesn't use the innerexception.

Is this issue resolved? I am still facing the same issue.. 

Any workaround or help will be of great help...

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.