I have a weighted undirected graph G and an edge e. I need to find a minimum spanning tree containing e, if and only if it exists.
I can interpret your question 2 different ways:
There are two potential points of failure:
A. the graph contains components not connected by an edge (no spanning tree exists)
B. the minimal spanning tree does not contain e
Approach (1) fails on condition A and B. Approach (2) fails only under condition A.