A Carlsbad caregiver who authorities said left a 2-year-old boy in an Encinitas craft store last month had been hospitalized for a mental health matter not long before the incident, which happened on her first day back to work, the caregiver’s attorney said Friday.

Desirae Harris, 42, pleaded not guilty Friday to felony child endangerment for the Nov. 16 incident, as well as a misdemeanor petty theft charge from that same day. She faces up to six years, six months in custody if she is convicted of all charges, Deputy District Attorney Justine Santiago said.

No new details of the incident were revealed during Harris’ brief arraignment in a Vista courtroom.

Following the hearing, Harris’ defense attorney Jay Finnacy said that his client had not set out to abandon the toddler, who was found wandering alone in a Michael’s store in Encinitas about noon Nov. 16.

“I think that initially upon leaving the store it may have been an oversight,” Finnacy said, “and then I think that panic set in.”

The attorney said his client “may have just been a little overwhelmed” by her first day back on the job.

He said Harris has “a history of mental health issues.” He did not specify his client’s diagnosis.

Finnacy said that Harris was a longtime caregiver, and had worked for the boy’s family for several months prior to her two-week hospitalization. He said Harris returned to working for the family a few weeks after her release, and said he was told that the family was aware of Harris’ hospitalization.

The child’s family did not attend the arraignment.

After the boy was found, a search of the store on North El Camino Real south of Garden View Road and surrounding businesses failed to turn up his parents. The Sheriff’s Department had also made loudspeaker announcements seeking the parents during a helicopter flyover of surrounding neighborhoods.

Officials issued a press release, and with public help, the parents were reunited that evening with the child.

The following morning, the department announced that deputies had arrested Harris. She posted $100,000 bail that same day, and was released from jail.