KoolbaseVectorDimensionMismatchException class
Thrown when the supplied vector's length does not match the dimension
declared on the collection's vector field — the server responds with
400 and code vector_dimension_mismatch. The message includes both
the expected and actual dimensions so you can surface a precise error.
try {
await Koolbase.db.doc(id).setVector('embedding', [0.1, 0.2]); // 2 dims
} on KoolbaseVectorDimensionMismatchException catch (e) {
showError(e.message); // "expected 1536, got 2"
}
- Inheritance
-
- Object
- KoolbaseException
- KoolbaseDataException
- KoolbaseVectorDimensionMismatchException
Constructors
- KoolbaseVectorDimensionMismatchException([String message = 'Vector dimension does not match field declaration'])
-
const
Properties
- code → String?
-
The server's stable error code, when it sent one. Prefer branching on the
exception type; this is for logging and for codes the SDK does not yet map.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
What went wrong, in words. From the server where it said something useful.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited