Added an error adapter to ensure that the error property exists