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 "already exists" error. This function is used to check if a given error signifies that a resource already exists, which is common in file system or database operations.

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.