Agree with ZeGerman, replacing sensor would be fastest and cheapest solution long term. The ambient temp sensors are only about $35 for Genuine BUT we don't have a listing for the harness connection you say is broken.
A broken harness connection could be much harder to find replacement parts. Quick fix would be just shorting the two leads together which would give you no resistance and set ambient to max temp (+122 deg) instead of current open circuit which is min temp. If that doesn't change or eliminate the error code then you've got something more to investigate.
Good luck!