I am running into this quite a bit in InDesign lately. When a PDF is placed into ID and exported to PDF, occasionally this error is received. It can be fixed by opening the original PDF and saving a optimized PDF, unless the file contains OpenType fonts then it needs to be saved as PostScript and re-Distilled.
My question, is there a log file somewhere that has more information on the error other than the generic "failed" error? I have poked through console on the Mac, and I cannot find anything.
I get the issue can be resolved by doing additional steps, but when this happens within a multi-page ID document it can take some time to determine which placed PDF is causing the error.