How properly handle error exception in try and catch block?
I have a problem with the flow of error handling. I have a try and catch block, and I need to ensure that the try block contains the logic for what should be executed. Specifically, a ticket should be created. However, the creation of the ticket can fail for two reasons. The first reason is that it cannot find the responder_id, which means either it doesn’t exist or it is working with a responder_id that is no longer in the database. In this case, I need to create a new ticket but set the responder_id to null, which I have implemented and it works.