Bug 1396831 - Align HTTP status codes with specification. r?jgraham draft
authorAndreas Tolfsen <ato@sny.no>
Tue, 05 Sep 2017 14:42:12 +0100
changeset 659119 1f5e5c5aa25b44b02d829d69c22a557645a9c573
parent 659096 edd83a8003f122723854db17ebf395a1b3b6a416
child 659133 9bd09680c90580f0f546632ac26494ce329e344b
push id78024
push userbmo:ato@sny.no
push dateTue, 05 Sep 2017 15:02:49 +0000
reviewersjgraham
bugs1396831
milestone57.0a1
Bug 1396831 - Align HTTP status codes with specification. r?jgraham Some of the HTTP status codes have changed in the WebDriver specification, as shown in: https://github.com/w3c/webdriver/commit/d678562e3d5f94fa71d74aeb467214bf8dd734e1 MozReview-Commit-ID: 4DLkYDXckew
testing/webdriver/src/error.rs
--- a/testing/webdriver/src/error.rs
+++ b/testing/webdriver/src/error.rs
@@ -189,21 +189,21 @@ impl ErrorStatus {
             InvalidArgument => BadRequest,
             InvalidCookieDomain => BadRequest,
             InvalidCoordinates => BadRequest,
             InvalidElementState => BadRequest,
             InvalidSelector => BadRequest,
             InvalidSessionId => NotFound,
             JavascriptError => InternalServerError,
             MoveTargetOutOfBounds => InternalServerError,
-            NoSuchAlert => BadRequest,
+            NoSuchAlert => NotFound,
             NoSuchCookie => NotFound,
             NoSuchElement => NotFound,
-            NoSuchFrame => BadRequest,
-            NoSuchWindow => BadRequest,
+            NoSuchFrame => NotFound,
+            NoSuchWindow => NotFound,
             ScriptTimeout => RequestTimeout,
             SessionNotCreated => InternalServerError,
             StaleElementReference => BadRequest,
             Timeout => RequestTimeout,
             UnableToCaptureScreen => BadRequest,
             UnableToSetCookie => InternalServerError,
             UnexpectedAlertOpen => InternalServerError,
             UnknownCommand => NotFound,