Type guard to check if a JSBridge response is a client error (4xx status codes).
The JSBridge response to check
True if the response is a client error (400, 401, 403, 404, 424, 426), false otherwise
const response = await someBridgeMethod();if (isClientError(response)) { // response is narrowed to BridgeClientError console.error('Client error:', response.error);} Copy
const response = await someBridgeMethod();if (isClientError(response)) { // response is narrowed to BridgeClientError console.error('Client error:', response.error);}
Type guard to check if a JSBridge response is a client error (4xx status codes).