The story isn't flawed. One might choose not to believe it but there really isn't any error in its telling.
God says: Don't eat that, you'll die if you eat that.
They eat it anyway, they die and then He comes down to bring them back to life.
Where exactly is the flaw?