mirror of
https://github.com/appium/appium.git
synced 2026-10-29 04:36:39 +08:00
* Do proxying for W3C responses * If a W3C Response is provided by a proxy, map to the correct error * Checks if `value` is an object and `value.error` and maps it based on that (`value.error` is the W3C error code) * Broke off `errorFromCode` into `errorFromMJSONWPStatusCode` and `errorFromW3CJsonCode` * Rename '.error' property to correct W3C property * The error property in the ProtocolError objects should match up with https://www.w3.org/TR/webdriver/#handling-errors under the 'JSON Error Code' column * Added tests for all of these * Make ProxyRequestError work for W3C * Added an arg called `.w3c` that passes in the proxied W3C error * Fixed the `getActualError` function that looks for the .w3c variable and parses error from the code
12 lines
540 B
JavaScript
12 lines
540 B
JavaScript
// transpile:main
|
|
|
|
import { Protocol, isSessionCommand,
|
|
routeConfiguringFunction } from './protocol';
|
|
import { NO_SESSION_ID_COMMANDS, ALL_COMMANDS, METHOD_MAP,
|
|
routeToCommandName } from './routes';
|
|
import { errors, isErrorType, errorFromMJSONWPStatusCode, errorFromW3CJsonCode } from './errors';
|
|
|
|
export { Protocol, routeConfiguringFunction, errors, isErrorType,
|
|
errorFromMJSONWPStatusCode, errorFromW3CJsonCode, ALL_COMMANDS, METHOD_MAP, routeToCommandName,
|
|
NO_SESSION_ID_COMMANDS, isSessionCommand };
|