handle string errors