is it possible to overdose on weed?

hi, me and my friend got 1 gram of weed and decided to do some brownies with it. my friend said he only stirred it for 30 minutes after decarbing it and when it was ready, my friend ate half of the cake( not in one sitting) and left me the other half of the cake. he said that he experienced absolutely nothing so i thought it wouldnt affect me and ate 3 pieces( half of the cake) and i didnt experience anything as well but after 3 hours i started to repeat my thoughts and was questioning “am i high rn?” afterwards i began to shake uncontrollably, my body was extremely hot and my heart was pounding like i was going to die, i almost blacked out and i couldnt even walk, i genuinely thought i was going to die and started praying. the effects went away after 3-4 hours and my extreme fast heart beat didnt go away for so long, when i wake up the other day i was still kind of high so i dont know how much did i consume and if weed has some effects like this. please someone tell me what happened lol😭