handles errors for ticket creation