{"record":{"id":"33b1bcf9f0d64f43","repo":"sds/overcommit","slug":"unable-to-load-configuration-from-file-e","errorCode":null,"errorMessage":"Unable to load configuration from '#{file}': #{e}","messagePattern":"Unable to load configuration from '#(.+?)': #(.+?)","errorType":"exception","errorClass":"Overcommit::Exceptions::ConfigurationError","httpStatus":null,"severity":"error","filePath":"lib/overcommit/configuration_loader.rb","lineNumber":85,"sourceCode":"      end\n    end\n\n    # Loads a configuration, ensuring it extends the default configuration.\n    def load_file(file, local_file = nil)\n      overcommit_config = self.class.load_from_file(file, default: false, logger: @log)\n      l_config = self.class.load_from_file(local_file, default: false, logger: @log) if local_file\n      config = self.class.default_configuration.merge(overcommit_config)\n      config = config.merge(l_config) if l_config\n\n      if @options.fetch(:verify) { config.verify_signatures? }\n        verify_signatures(config)\n      end\n\n      config\n    rescue Overcommit::Exceptions::ConfigurationSignatureChanged\n      raise\n    rescue StandardError => e\n      raise Overcommit::Exceptions::ConfigurationError,\n            \"Unable to load configuration from '#{file}': #{e}\",\n            e.backtrace\n    end\n\n    private\n\n    def verify_signatures(config)\n      if !config.previous_signature?\n        raise Overcommit::Exceptions::ConfigurationSignatureChanged,\n              \"No previously recorded signature for configuration file.\\n\" \\\n              'Run `overcommit --sign` if you trust the hooks in this repository.'\n\n      elsif config.signature_changed?\n        raise Overcommit::Exceptions::ConfigurationSignatureChanged,\n              \"Signature of configuration file has changed!\\n\" \\\n              \"Run `overcommit --sign` once you've verified the configuration changes.\"\n      end\n    end","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/sds/overcommit/blob/fee0cd74b26eb81f64b43b7fab17bbb541575cc4/lib/overcommit/configuration_loader.rb#L67-L103","documentation":"Error \"Unable to load configuration from '#{file}': #{e}\" thrown in sds/overcommit.","triggerScenarios":"Thrown at lib/overcommit/configuration_loader.rb:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the appended exception message for the exact failure (missing file, permission denied, YAML syntax error) and correct it.","Check that the configuration file exists at the reported path and is readable.","Validate the YAML syntax of the configuration file (e.g. with a YAML linter) and fix parse errors."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fee0cd74b26eb81f64b43b7fab17bbb541575cc4","analyzedAt":"2026-08-23T04:07:28.153Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}