RBP
RBP

Reputation: 485

HTTP Status Code 200-299 or 400

I am adding my tasks to the Task Queue. But when the tasks run, I get the following error:

"Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404."

Java Code:

String url = "/myapp/showDetails.htm?userEmail="+userEmail;
                Queue queue = QueueFactory.getDefaultQueue();
                TaskOptions objTskOptions = TaskOptions.Builder.withUrl(url)
                                            .header("Host",BackendServiceFactory.getBackendService()
                                            .getBackendAddress("BackendName")).method(Method.GET)
                                            .retryOptions(RetryOptions.Builder.withTaskRetryLimit(5).maxDoublings(3));
                queue.add(objTskOptions);
                logger.info("Task Queue URL::"+objTskOptions.getUrl());

Why am I getting this error message?

Upvotes: 0

Views: 2793

Answers (1)

Peter Knego
Peter Knego

Reputation: 80340

The Task Queue runs code asynchronously and it's result is not visible to the user. It seems that your url /myapp/showDetails.htm is producing html?

Also make sure that you can actually invoke the full url by hand (executing on your backend instance): e.g. shareduserlevelcontacts.yourapp.appspot.com/myapp/showDetails.htm?userEmail=some@email

Upvotes: 1

Related Questions