|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 4 of 4 total|
|Thu, Aug 28 2014 9:49 AM||Permanent Link|
i'm using a customdatasetmodule with firebird. Works great but i have a problem with Errormessages
There are Situations where the Commit failed because of a
Foreign key Error.
I send the message as Request.SendError(HTTP_INTERNAL_ERROR, 'The Filale does not exist. Please check your Input');
But on Clientside i see only :
'Database commit response error:'
Is there a setting i'm missing to get the correct error text?
|Thu, Aug 28 2014 10:01 AM||Permanent Link|
Friedrich Westermann wrote:
> Is there a setting i'm missing to get the correct error text?
If you look at the framework code, in webdata.wbs, the
TDatabase.RequestComplete procedure appears to be the location of
interest. It looks for a 200 response code, and otherwise outputs the
error you mention with the %s for Request.ResponseContent.Text which
would imply to me that you should be seeing your text.
The next step, if I was doing this, would be to use the Chrome F12
debugging and look at the actual request response. It may be that the
server isn't sending the text, or it is coming in another part of the
response. If need be, you could modify the framework code, but be sure
to restart the IDE as it caches it.
|Thu, Aug 28 2014 10:34 AM||Permanent Link|
i was checking now in Chrome and there is no response payload.....
But without the source for the custom Modules there is nothing i can do i think
|Thu, Aug 28 2014 1:39 PM||Permanent Link|
Got an answer from Tim:
SendError only returns an HTTP error code along an (optional) message. It is completely up to the browser as to whether it chooses to show the message or not. Most browsers just ignore the message and do whatever they want with the error code. If you want to force the browser to show the error message in the form of content, then you should use this method instead:
procedure SendContent(const Content: String;
const StatusMessage: String='');
and specify the HTTP status (error) code that you want to send.
These fixed my problem