{"record":{"id":"ff6a8c989607e0b0","repo":"go-gorm/gorm","slug":"unsupported-data","errorCode":null,"errorMessage":"unsupported data","messagePattern":"unsupported data","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"errors.go","lineNumber":29,"sourceCode":"\tErrRecordNotFound = logger.ErrRecordNotFound\n\t// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`\n\tErrInvalidTransaction = errors.New(\"invalid transaction\")\n\t// ErrNotImplemented not implemented\n\tErrNotImplemented = errors.New(\"not implemented\")\n\t// ErrMissingWhereClause missing where clause\n\tErrMissingWhereClause = errors.New(\"WHERE conditions required\")\n\t// ErrUnsupportedRelation unsupported relations\n\tErrUnsupportedRelation = errors.New(\"unsupported relations\")\n\t// ErrPrimaryKeyRequired primary keys required\n\tErrPrimaryKeyRequired = errors.New(\"primary key required\")\n\t// ErrModelValueRequired model value required\n\tErrModelValueRequired = errors.New(\"model value required\")\n\t// ErrModelAccessibleFieldsRequired model accessible fields required\n\tErrModelAccessibleFieldsRequired = errors.New(\"model accessible fields required\")\n\t// ErrSubQueryRequired sub query required\n\tErrSubQueryRequired = errors.New(\"sub query required\")\n\t// ErrInvalidData unsupported data\n\tErrInvalidData = errors.New(\"unsupported data\")\n\t// ErrUnsupportedDriver unsupported driver\n\tErrUnsupportedDriver = errors.New(\"unsupported driver\")\n\t// ErrRegistered registered\n\tErrRegistered = errors.New(\"registered\")\n\t// ErrInvalidField invalid field\n\tErrInvalidField = errors.New(\"invalid field\")\n\t// ErrEmptySlice empty slice found\n\tErrEmptySlice = errors.New(\"empty slice found\")\n\t// ErrDryRunModeUnsupported dry run mode unsupported\n\tErrDryRunModeUnsupported = errors.New(\"dry run mode unsupported\")\n\t// ErrInvalidDB invalid db\n\tErrInvalidDB = errors.New(\"invalid db\")\n\t// ErrInvalidValue invalid value\n\tErrInvalidValue = errors.New(\"invalid value, should be pointer to struct or slice\")\n\t// ErrInvalidValueOfLength invalid values do not match length\n\tErrInvalidValueOfLength = errors.New(\"invalid association values, length doesn't match\")\n\t// ErrPreloadNotAllowed preload is not allowed when count is used\n\tErrPreloadNotAllowed = errors.New(\"preload is not allowed when count is used\")","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/go-gorm/gorm/blob/1d6ce99528060be18a42be09aca8d39efcb47f28/errors.go#L11-L47","documentation":"Error \"unsupported data\" thrown in go-gorm/gorm.","triggerScenarios":"Thrown at errors.go:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a pointer to a struct or slice as the destination/model value.","Check for unsupported types such as maps with non-string keys or chan/func fields in the model.","Implement driver.Valuer and sql.Scanner on custom field types so GORM can handle them."],"exampleFix":"Validate the value is a struct or slice of structs before passing it to Create/Find: reflect.ValueOf(v).Kind() must be Struct or Slice.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1d6ce99528060be18a42be09aca8d39efcb47f28","analyzedAt":"2026-08-15T13:01:23.433Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}