@public
interface
FieldError
Represents an error that occurred in a specific field of a data object.
Import
import {type FieldError} from 'sanity'
Signature
interface FieldError {
error: | IncompatibleTypeError
| TypeAnnotationMismatchError
| MissingKeysError
| DuplicateKeysError
| UndeclaredMembersError
| MixedArrayError
fieldName: string
key: string
kind: 'error'
}
Properties
error: | IncompatibleTypeError
| TypeAnnotationMismatchError
| MissingKeysError
| DuplicateKeysError
| UndeclaredMembersError
| MixedArrayError
error: | IncompatibleTypeError
| TypeAnnotationMismatchError
| MissingKeysError
| DuplicateKeysError
| UndeclaredMembersError
| MixedArrayError
The specific error that occurred.
Possible error types include:
- IncompatibleTypeError
- TypeAnnotationMismatchError
- MissingKeysError
- DuplicateKeysError
- UndeclaredMembersError
- MixedArrayError
See IncompatibleTypeError, TypeAnnotationMismatchError, MissingKeysError, DuplicateKeysError, UndeclaredMembersError and MixedArrayError for more information.
fieldName: string
fieldName: string
The name of the field that the error occurred in.
key: string
key: string
The unique identifier for the error.
kind: 'error'
kind: 'error'
The type of error that occurred.
Remarks
This interface is used to provide detailed information about the error, including the field name, the error type, and the error message.