Handle error messages properly/handler testing