{"record":{"id":"5518c45191db3667","repo":"XTLS/Xray-core","slug":"config-failed-to-parse-blackhole-response-config","errorCode":null,"errorMessage":"Config: Failed to parse Blackhole response config.","messagePattern":"Config: Failed to parse Blackhole response config\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"infra/conf/blackhole.go","lineNumber":33,"sourceCode":"\treturn new(blackhole.NoneResponse), nil\n}\n\ntype HTTPResponse struct{}\n\nfunc (*HTTPResponse) Build() (proto.Message, error) {\n\treturn new(blackhole.HTTPResponse), nil\n}\n\ntype BlackholeConfig struct {\n\tResponse json.RawMessage `json:\"response\"`\n}\n\nfunc (v *BlackholeConfig) Build() (proto.Message, error) {\n\tconfig := new(blackhole.Config)\n\tif v.Response != nil {\n\t\tresponse, _, err := configLoader.Load(v.Response)\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"Config: Failed to parse Blackhole response config.\").Base(err)\n\t\t}\n\t\tresponseSettings, err := response.(Buildable).Build()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tconfig.Response = serial.ToTypedMessage(responseSettings)\n\t}\n\n\treturn config, nil\n}\n\nvar configLoader = NewJSONConfigLoader(\n\tConfigCreatorCache{\n\t\t\"none\": func() interface{} { return new(NoneResponse) },\n\t\t\"http\": func() interface{} { return new(HTTPResponse) },\n\t},\n\t\"type\",\n\t\"\",","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/infra/conf/blackhole.go#L15-L51","documentation":"Error \"Config: Failed to parse Blackhole response config.\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at infra/conf/blackhole.go:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}