Atozed Forums
Tcontent Handler and notify errors to frontend - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Tcontent Handler and notify errors to frontend (/thread-1070.html)



Tcontent Handler and notify errors to frontend - cprmlao@hotmail.com - 05-09-2019

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


RE: Tcontent Handler and notify errors to frontend - Jose Nilton Pace - 05-10-2019

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


RE: Tcontent Handler and notify errors to frontend - cprmlao@hotmail.com - 05-10-2019

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

Ho,
Thank you very much