MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / getErrorString

Function getErrorString

packages/wdio-browserstack-service/src/util.ts:1697–1706  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

1695}
1696
1697export const getErrorString = (err: unknown) => {
1698 if (!err) {
1699 return undefined
1700 }
1701 if (typeof err === 'string') {
1702 return err // works, `e` narrowed to string
1703 } else if (err instanceof Error) {
1704 return err.message // works, `e` narrowed to Error
1705 }
1706}
1707
1708export function truncateString(field: string, truncateSizeInBytes: number): string {
1709 try {

Callers 3

uploadLogsFunction · 0.85
updateO11yStopDataMethod · 0.85
failedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…