How to manage TWebHtttpRequest errors

I opened the Web Core Example TMSWeb_SimpleServe.web project of the Demos.
It works well, of course.
I added a new component, TWebHttpRequest, with his properties by default.

I Added a New button, and in his OnClick event, I added the next code:

procedure TForm1.WebButton2Click(Sender: TObject);
     WebHttpRequest2.URL := '';

When I run the program and click this second button, nothing happens.

I Implemented the OnError event handler, and I wrote the next code in it:

procedure TForm1.WebHttpRequest2Error(Sender: TObject; ARequest: TJSXMLHttpRequestRecord; Event: TJSEventRecord; var Handled: Boolean);
     Handled := True;

And I discovered that I always have an error.

If I put this request on the Chrome address bar:

I get the next text: "This is a public section."
This means the server is working well, but...

1st question. What is wrong with my program?

2nd question. Where can I find an example of how to manage the errors in this case?
OnError Event Handler receives a TJSXMLHttpRequestRecord and a TJSEventRecord parameter, but Nothing in the documentation seems to explain what I can do with these parameters to find the error.

Thanks in advance.


For the first question, this is the answer:

But I think it is important to know "how to" the second question.


The Event parameter should contain the details of the error. Start by inspecting this via a console.log(Event) and this way you’ll see all error related info returned.