WeaviateEx.Error exception (WeaviateEx v0.7.4)
View SourceError struct for WeaviateEx operations.
Summary
Functions
Create a backup already exists error.
Create a backup failed error.
Create a backup not found error.
Create a backup timeout error.
Create a cluster not ready error.
Create error from GRPC.RPCError struct.
Create error from gRPC status code.
Create error from HTTP status code
Checks if a gRPC status code is retryable.
Create an invalid backup backend error.
Create an invalid permission error.
Create a node not found error.
Create a permission denied error.
Create an RBAC-specific error with category metadata.
Create a replication failed error.
Create a replication timeout error.
Create a restore failed error.
Create a role not found error.
Create a shard not found error.
Create a user not found error.
Create a vector indexing timeout error.
Types
Functions
Create a backup already exists error.
Examples
error = Error.backup_already_exists("backup-123", :s3)
Create a backup failed error.
Examples
error = Error.backup_failed("backup-123", "disk full")
Create a backup not found error.
Examples
error = Error.backup_not_found("backup-123", :filesystem)
Create a backup timeout error.
Examples
error = Error.backup_timeout("backup-123", :create)
@spec cluster_not_ready() :: t()
Create a cluster not ready error.
Examples
error = Error.cluster_not_ready()
@spec from_grpc_error(GRPC.RPCError.t()) :: t()
Create error from GRPC.RPCError struct.
Examples
error = Error.from_grpc_error(%GRPC.RPCError{status: 5, message: "Not found"})
error.type #=> :not_found
Create error from gRPC status code.
Maps gRPC status codes to WeaviateEx error types.
Examples
error = Error.from_grpc_status(:not_found, "Object not found")
error.type #=> :not_found
error = Error.from_grpc_status(:unavailable, "Service unavailable")
error.type #=> :service_unavailable
Create error from HTTP status code
Checks if a gRPC status code is retryable.
Examples
true = Error.grpc_retryable?(:unavailable)
true = Error.grpc_retryable?(:resource_exhausted)
false = Error.grpc_retryable?(:invalid_argument)
Create an invalid backup backend error.
Examples
error = Error.invalid_backend(:invalid)
Create an invalid permission error.
Examples
error = Error.invalid_permission("Invalid action for collection type")
Create a node not found error.
Examples
error = Error.node_not_found("node-1")
Create a permission denied error.
Examples
error = Error.permission_denied(:delete, "Article")
Create an RBAC-specific error with category metadata.
Examples
error = Error.rbac_error(:not_found, "Role not found", %{role: "admin"})
Create a replication failed error.
Examples
error = Error.replication_failed("op-123", "target node unavailable")
Create a replication timeout error.
Examples
error = Error.replication_timeout("op-123")
Create a restore failed error.
Examples
error = Error.restore_failed("backup-123", "collection already exists")
Create a role not found error.
Examples
error = Error.role_not_found("admin")
Create a shard not found error.
Examples
error = Error.shard_not_found("Article", "shard-1")
Create a user not found error.
Examples
error = Error.user_not_found("john.doe")
Create a vector indexing timeout error.
Examples
error = Error.vector_indexing_timeout("Article")