fix error message
add error check to request