Added error handling for invalid request ID