Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 13 of 13 total
Thread OnLoadError message
Tue, Oct 13 2015 10:54 AMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 10/13/2015 10:32 AM, Uli Becker wrote:
> OK, but how about the (EWB) database properties "Username" and
> "Password", how about the TDatabaseAdapter's event "OnAuthenticateUser"
> and method "AuthenticateUser"? Are these useless then?

Good point - forgot about those.

I don't consider it a good practice so don't use them at all.

The current handling is slightly problematic anyways (the issue you ran
into that incorrectly reports server connect error if data is blank).

Ideally if Tim can fix it to have better error messages for these cases
(http response code is not 0 and there is no data content) and/or also
to surface the actual response code in the callback function.

Raul
Tue, Oct 13 2015 11:04 AMPermanent Link

Uli Becker

Raul,

> I don't consider it a good practice so don't use them at all.
>
> The current handling is slightly problematic anyways (the issue you ran
> into that incorrectly reports server connect error if data is blank).
>
> Ideally if Tim can fix it to have better error messages for these cases
> (http response code is not 0 and there is no data content) and/or also
> to surface the actual response code in the callback function.

Thanks, Raul. Interesting discussion.

Uli
Tue, Oct 13 2015 12:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Raul,

<< Ideally if Tim can fix it to have better error messages for these cases (http response code is not 0 and there is no data content) and/or also to surface the actual response code in the callback function. >>

This is what the dataset load/commit error response code looks like now:

     if (Request.StatusCode=HTTP_NONE) then
        TempErrorMsg:=Translate('ERR_DATA_CONNECT')
     else
        begin
        if (Request.ResponseContent.Text > '') then
           TempErrorMsg:=Request.ResponseContent.Text
        else if (Request.StatusText <> '') then
           TempErrorMsg:=Request.StatusText
        else
           TempErrorMsg:=Translate('ERR_DATA_LOADCODE',[IntToStr(Request.StatusCode)]);
        end;

It effectively separates out the "no response code" of connection/CORS errors, and then starts a process of backing down through the available locations for detailed response information.

This will be in 2.02 Build 2 (2.02 B1 is now out today).

Tim Young
Elevate Software
www.elevatesoft.com
Previous PagePage 2 of 2
Jump to Page:  1 2
Image