added errors method to session