Tcontent Handler and notify errors to frontend

<< Click to Display Table of Contents >>

Navigation:  Forum >

Tcontent Handler and notify errors to frontend

Forum link

 


 

05-09-2019, 10:28 PM:

 

I have a javascript code on frontend, where I call a content handler. 

 

When using TcontentHandlers, if the handler fail I need to inform the front end that an error occur.

 

The response of the handler is something as 

 

Code:

 

aReply.WriteString(here is the result);

 

 

 

But if there is an error, such as "400 error" or similar , how could I inform the frontend?

 

What could I put in writestring?

 

Luiz

 


 

05-10-2019, 11:07 AM:

 

Hi Luiz. You can aReply.Code := 400;

 


 

05-10-2019, 04:06 PM:

 

(05-10-2019, 11:07 AM)Jose Nilton Pace Wrote: [ -> ]Hi Luiz. You can aReply.Code := 400;

 

Ho,

 

Thank you very much