Error handling work to align with plugin