isSdkServerError
Checks if the given error was caused by SDKError and its status code is between 500 and 600, indicating a server error.
Signature
isSdkServerError: (
error: unknown
) => error is ErrorCausedBySDKErrorParameters
| Name | Required | Type | Description |
|---|---|---|---|
error | Required | unknown | The error to check. |
Returns
A type predicate indicating whether the error is a server error caused by SDKError.
Referenced Types
Examples
catch (error) {
if (isSdkServerError(error)) {
// handle server error (show maintenance page, retry, etc.)
}
}