Returns true when code indicates the request itself is broken and retrying without
changes is unlikely to succeed. Consumers should treat these as non-retryable: log at
ERROR and stop, rather than rethrowing into a retry framework.
Parameters
code: string|undefined
Returns boolean
Example
if (isFailure(result)) { constcode = result.error.issues[0]?.code; if (isClientError(code)) { logger.error("Notification failed with client error; not retrying", { code }); return; } throwresult.error; }
Returns
truewhencodeindicates the request itself is broken and retrying without changes is unlikely to succeed. Consumers should treat these as non-retryable: log at ERROR and stop, rather than rethrowing into a retry framework.