Type guard to check if an SDK response has an error status code (400, 401, 403, 404, 424, 426, 500, 501).
400
401
403
404
424
426
500
501
The SDK response to check
true if the response is an error, false otherwise
true
false
const response = await someBridgeMethod();if (isError(response)) { // response narrowed to error variants, `error` is available console.error(response.error);} Copy
const response = await someBridgeMethod();if (isError(response)) { // response narrowed to error variants, `error` is available console.error(response.error);}
Type guard to check if an SDK response has an error status code (
400,401,403,404,424,426,500,501).