error checking for requests