Hi,
Afaict Lukas ment: from the (boolean) result of the HttpMethod call, you
can know if there was communication with the server or not. Only if
there was, http status code will contain a valid value.
regards
Wily Dev schreef:
First error indicator is result of HttpMethod call.
Absolutely. HOWEVER: As you yourself indicate later in the message: 'It made
error check very simple in cases when you need to know just: "has been OK or
not?". ' SO: You know that people are using it that way; and it seems to
be a "use case" that you're purposely designing for.
In case of false result is setted HTTP error code to 'hard fail'
value 500 too. It made error check very simple in cases when you need
to know just: "has been OK or not?".
Unfortunately, 500 is NOT 'hard fail,' it's supposed to be a *message* from
the server, about that SERVER having an internal failure. So any Synapse
user not using/checking the function result first will be interpreting this
result code as a valid response from the server!
This case is rather simple and straight forward, and so is the fix: Giving
that result code a 'hard failure' value that's definitely OUTSIDE of the
valid HTTP response codes (like -1, or 9999, or 50,000++ ...) would be very
simple and very clear. Anyone who's just checking for successful codes
(200-series) wouldn't be affected at all; and anyone who's properly checking
the function result first, is "doing things right" anyway, and is not
affected. Any user that's treating the result code as a true result coming
from the server, now gets accurate results. Anyone who's checking for a 500
code... will need to change their code, but that's most likely VERY rare,
since the 500 code is an "internal feature" to the code, and it's probably
much more natural for most programmers to check for success...
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public