How to understand how to resolve error handling ticket

Hi everyone,
I’m blocked on error handling ticket. I don’t know how to resolve this lab, the video that I had seen before didn’t show any hint to resolve that. Can someone help me please?

Hi @Cristiano_Aloigi, welcome to the community.
You will need a basic understanding of error handling in .Net. The only thing you will need after that is to check whether the error message includes:

is not a valid 24 digit hex string.

If that’s the case return null otherwise throw an error in the catch block.

Exception handling in C#
Error handling using the MongoDB .NET driver

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer