If an error is found in my answer, is it appropriate to delete the answer and let someone else more knowledgeable answer?
Or is should I attempt to correct my solution through edits?
What is the general etiquette?
It's up to you, but I would lean towards editing or, if you can't fix the error, striking out the incorrect parts and leaving it up as a lesson to others. There are situations where multiple people give the same incorrect answer to a question because they all made the same mistake, and having at least one example of that mistake available is valuable!