Skip to main content

IsExists

Gets a value indicating whether the underlying error is "already exists" error.

def IsExists(
err: error
) - > bool

Gets a value indicating whether the underlying error is an "already exists" error. This function is used to check if a given error signifies that a resource or file already exists, which can be useful for error handling and flow control.

Parameters

NameTypeDescription
errerrorThe error to check for an "already exists" condition. This error can be wrapped, and the function will attempt to find the root cause.

Returns

TypeDescription
boolTrue if the error indicates an "already exists" condition, otherwise False.