I recently obtained (or so I thought) a good result, and after a month of reading and rereading what I'd written, submitted my paper to a very good journal. I'm early in my career (got my Ph.D. a few years ago) and have published 2 papers in good journals; so I figured I'd aim for a top journal this time. Unfortunately, I just got an email from the journal indicating that the anonymous referee had found a serious, probably unfixable error in my paper, and that (obviously) they don't recommend it for publication. After looking at it, I realize that I really should have caught this error: although it is a relatively subtle error buried inside of a technical lemma, it still is an obvious error once you notice it. I'm frustrated that I missed this mistake and I'm embarrassed to have wasted the time of the referee, who probably spent a lot of time combing through my paper before they found the error. So here are my questions. 1) Has this happened to anyone else? Is this a relatively common occurrence, or am I just sloppy? 2) The anonymous referee is probably someone distinguished in my field. Do they now have a bad impression of me? (This probably is not a question that can easily be answered . . . .) 3) If I manage to patch up this paper, is it reasonable to resubmit it to this journal, or have I burned my bridges there? I'm going to make this community wiki, since I don't know if there's a "right" answer.