Skip to main content

IsNotFound

Checks if the given error is a gRPC error with a "NotFound" status code.

def IsNotFound(
err: error
) - > bool

Checks if the provided error is a gRPC error with a 'NotFound' status code. This function is useful for handling specific error conditions where a resource not being found is an expected or common scenario.

Parameters

NameTypeDescription
errerrorThe error to check for a 'NotFound' gRPC status code.

Returns

TypeDescription
boolTrue if the error is a gRPC 'NotFound' error, False otherwise.