MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / wrapError

Function wrapError

lib/helper/WebDriver.js:55–62  ·  view source on GitHub ↗

* Wraps error objects that don't have a proper message property * This is needed for ESM compatibility with WebdriverIO error handling

(e)

Source from the content-addressed store, hash-verified

53 * This is needed for ESM compatibility with WebdriverIO error handling
54 */
55function wrapError(e) {
56 if (e && typeof e === 'object' && !e.message) {
57 const err = new Error(e.error || e.timeoutMsg || String(e))
58 err.stack = e.stack
59 return err
60 }
61 return e
62}
63
64/**
65 * ## Configuration

Callers 5

waitForClickableMethod · 0.70
waitInUrlMethod · 0.70
waitUrlEqualsMethod · 0.70
waitCurrentPathEqualsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected