SQL temp tables, table that start with an #, exist for the duration of a connection. According to the error the code is trying to create the same temp table, #tempTable, in the same connection. One solution might be to check if the #tempTable exists before trying to create another #tempTable within the same connection.
IF OBJECT_ID('tempdb..#tempTable') IS NULL
CREATE TABLE #tempTable (Id int)
Unfortunately, the code you've shared is missing bits which makes it hard to provide a good recommendation. But understanding the cause of the error should be enough for you to come up with a solution.