Open jovanbulck opened 8 years ago
No real problem maybe, but it would be nice if the browser could throw an exception or so when detecting the html response is not as expected.
Definitely.
Seems like the parser (browser class) couldn't find and thus did not fill in the rccode variable, since the html page did not look as expected?
That's true. The parser finds the RC code using a regular expression match. The rc code is usually lead by a small string: weblogin: rc=
. For some reason, with this specific error, it's just rc=
. Very strange.
I am not sure whether the 301 code is an RC code??
I am not sure either. To me, it looks like the Kotnet programmers did not expect error 301 to happen, and therefore, haven't declared a specific RC code for this purpose yet.
To round off, yes, we do need an exception when the RC code is different than expected.
And, of course: thank you for reporting this issue.
301 is the rccode for internal script error (see issue #80 ), so I guess what happened here is not anticipated in an rccode (?)
To round off, yes, we do need an exception when the RC code is different than expected.
Not really, we already have an UnknownRCException
. What happened here is that the rccode variable was empty, since no rccode has been found in the html page. The python code however tries to print out the empty variable, which raises an exception... We thus need to handle the case were no rccode can be found in the html page...
Yesterday kotnet/campusnet was down When attempting to log in
kotnetcli
crashed with the following output:Seems like the parser (browser class) couldn't find and thus did not fill in the rccode variable, since the html page did not look as expected? No real problem maybe, but it would be nice if the browser could throw an exception or so when detecting the html response is not as expected. The worker could then catch this exception and inform the communicator of a fatal error... Could something like this be possible?
I am not sure whether the 301 code is an RC code?? As with issue #85 there seem to be two codes involved (exctract from html dump below):
I retrieved the full html page with a web browser: