A 49-year-old woman who died after waiting nearly an hour for an ambulance should have had her case classed more urgently, an inquest has heard.
Trudy Jones's husband Ronald dialled 999 on 2 January 2016 because his wife was unwell and had difficulty breathing at their Wrexham home.
The Ruthin inquest heard Mr Jones made the first call at about 23:33 GMT.
But his wife collapsed 45 minutes later and stopped breathing seven minutes before the ambulance arrived.
In a statement from Mr Jones, the inquest heard the Welsh Ambulance Services NHS Trust (WAST) had called him back at 23:51 to assess the situation.
At 00:08 on 3 January, Mr Jones rang the emergency services again because no ambulance had arrived and his wife was in "great pain".
At 00:14 she collapsed and stopped breathing, he said, and at 00:21 the ambulance arrived.
He said a crew worked on his wife for 20 minutes before she was pronounced dead.
A post-mortem examination revealed evidence of a previous heart attack.
Assistant coroner Nicola Jones said it was a "ticking bomb" which nobody knew about. On the night she died, she was suffering heart failure.
Gill Pleming, of WAST, told the inquest the case was classed as "amber two" but should have been classed as "amber one" - a more urgent response - from the very first call.
She said it was mis-categorised because a call-handler had indicated "yes" instead of "no" when considering whether Mrs Jones was capable of finishing sentences.
She said it was a "very challenging night shift" and the nearest available ambulance was in Welshpool, 56 minutes away.
Ms Pleming apologised to the family for the errors but said staff had undergone extra training since Ms Jones's death.
Another opportunity was also missed to re-classify Mrs Jones's case, when a WAST operator rang to assess the situation.
The inquest heard the family lived very close to Wrexham Maelor hospital and could have travelled there in five minutes.
The two-day inquest continues.