{"record":{"id":"32cba70196c98c05","repo":"ory/kratos","slug":"unable-to-find-identity-schema-with-id-s","errorCode":null,"errorMessage":"unable to find identity schema with id: %s","messagePattern":"unable to find identity schema with id: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"driver/config/config.go","lineNumber":389,"sourceCode":"\nconst HookGlobal = \"global\"\n\nfunc HookStrategyKey(key, strategy string) string {\n\tif strategy == HookGlobal {\n\t\treturn fmt.Sprintf(\"%s.hooks\", key)\n\t} else {\n\t\treturn fmt.Sprintf(\"%s.%s.hooks\", key, strategy)\n\t}\n}\n\nfunc (s Schemas) FindSchemaByID(id string) (*Schema, error) {\n\tfor _, sc := range s {\n\t\tif sc.ID == id {\n\t\t\treturn &sc, nil\n\t\t}\n\t}\n\n\treturn nil, errors.Errorf(\"unable to find identity schema with id: %s\", id)\n}\n\nfunc MustNew(t testing.TB, l *logrusx.Logger, ctxer contextx.Contextualizer, opts ...configx.OptionModifier) *Config {\n\tp, err := New(t.Context(), l, os.Stderr, ctxer, opts...)\n\trequire.NoError(t, err)\n\treturn p\n}\n\nfunc New(ctx context.Context, l *logrusx.Logger, stdOutOrErr io.Writer, ctxer contextx.Contextualizer, opts ...configx.OptionModifier) (*Config, error) {\n\tvar c *Config\n\n\topts = append([]configx.OptionModifier{\n\t\tconfigx.WithStderrValidationReporter(),\n\t\tconfigx.OmitKeysFromTracing(\"dsn\", \"courier.smtp.connection_uri\", \"secrets.default\", \"secrets.cookie\", \"secrets.cipher\", \"client_secret\"),\n\t\tconfigx.WithImmutables(\"serve\", \"profiling\", \"log\"),\n\t\tconfigx.WithExceptImmutables(\"serve.public.cors.allowed_origins\"),\n\t\tconfigx.WithLogrusWatcher(l),\n\t\tconfigx.WithLogger(l),","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/ory/kratos/blob/b86338da04a040247a07f46100a86dcfb3875909/driver/config/config.go#L371-L407","documentation":"FindSchemaByID did a linear scan over the configured identity schemas (Schemas slice) and none of them carried the requested ID. The schema id being looked up - commonly the identity's default schema - is absent from the identity.schemas configuration.","triggerScenarios":"Thrown at driver/config/config.go:389 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add an entry with that id to the identity.schemas configuration","Check for typos or whitespace in the schema id referenced by default_schema or the identity","Ensure the config file actually loaded (watch for config path mistakes)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b86338da04a040247a07f46100a86dcfb3875909","analyzedAt":"2026-09-07T15:58:15.934Z","contentChangedAt":"2026-09-07T15:58:15.934Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}