Skip to content

Commit 05c2028

Browse files
committed
Updating HTTP error return status for IE driver to align with spec
1 parent a4bbfbe commit 05c2028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpp/webdriver-server/response.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ int Response::GetHttpResponseCode(void) {
121121
this->error_ == ERROR_INVALID_COORDINATES ||
122122
this->error_ == ERROR_INVALID_ELEMENT_STATE ||
123123
this->error_ == ERROR_INVALID_SELECTOR ||
124-
this->error_ == ERROR_NO_SUCH_ALERT ||
125-
this->error_ == ERROR_NO_SUCH_FRAME ||
126-
this->error_ == ERROR_NO_SUCH_WINDOW ||
127124
this->error_ == ERROR_STALE_ELEMENT_REFERENCE) {
128125
response_code = 400;
129126
} else if (this->error_ == ERROR_INVALID_SESSION_ID ||
130127
this->error_ == ERROR_NO_SUCH_COOKIE ||
128+
this->error_ == ERROR_NO_SUCH_ALERT ||
131129
this->error_ == ERROR_NO_SUCH_ELEMENT ||
130+
this->error_ == ERROR_NO_SUCH_FRAME ||
131+
this->error_ == ERROR_NO_SUCH_WINDOW ||
132132
this->error_ == ERROR_UNKNOWN_COMMAND) {
133133
response_code = 404;
134134
} else if (this->error_ == ERROR_SCRIPT_TIMEOUT ||

0 commit comments

Comments
 (0)