Type guard to check if a JSBridge response is a server error (5xx status codes).
The JSBridge response to check
True if the response is a server error (500, 501), false otherwise
const response = await someBridgeMethod();if (isServerError(response)) { // response is narrowed to BridgeServerError console.error('Server error:', response.error);} Copy
const response = await someBridgeMethod();if (isServerError(response)) { // response is narrowed to BridgeServerError console.error('Server error:', response.error);}
Type guard to check if a JSBridge response is a server error (5xx status codes).