Issue Details (XML | Word | Printable)

Key: SRC-409
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Stefan Birkner
Votes: 4
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Meaningful error message if status code is not 200

Created: 16/Jan/08 04:26 AM   Updated: 23/Nov/08 09:40 AM
Component/s: Client Driver - Java
Affects Version/s: 0.9.2
Fix Version/s: None


 Description  « Hide

In the method getCommandResponse(String, InputStream) of the class com.thoughtworks.selenium.HttpCommandProcessor a SeleniumException will be thrown if the HTTP status code is not equal 200. The exception's message is simply the response message. This doesn't help. I myself got an message
com.thoughtworks.selenium.SeleniumException: Internal Server Error
but didn't know that this is the HTTP response message and therefore had to look to the code.

Please extend the message at line 124 of HttpCommandProcessor . My proposal is
throw new SeleniumException("Status code " + HttpURLConnection.HTTP_OK + " expected but " + uc.getResponseCode() + " (" + uc.getResponseMessage() + ") received.");



Sort Order: Ascending order - Click to sort in descending order
Dennis added a comment - 23/Nov/08 09:40 AM

A related feature request to access the HTTP status code of a page:
http://jira.seleniumhq.org/browse/SRC-563