{"record":{"id":"986aadc1f60918a0","repo":"sds/overcommit","slug":"invalid-message-type-type-for-message-m","errorCode":null,"errorMessage":"Invalid message type '#{type}' for '#{message}': must be one of #{Overcommit::Hook::MESSAGE_TYPES.inspect}","messagePattern":"Invalid message type '#(.+?)' for '#(.+?)': must be one of #(.+?)","errorType":"exception","errorClass":"Overcommit::Exceptions::MessageProcessingError","httpStatus":null,"severity":"error","filePath":"lib/overcommit/utils/messages_utils.rb","lineNumber":67,"sourceCode":"\n        match[:file]\n      end\n\n      def extract_line(match, message)\n        return unless match.names.include?('line')\n\n        Integer(match[:line])\n      rescue ArgumentError, TypeError\n        raise Overcommit::Exceptions::MessageProcessingError,\n              \"Unexpected output: invalid line number found in '#{message}'\"\n      end\n\n      def extract_type(match, message, type_categorizer)\n        if type_categorizer\n          type_match = match.names.include?('type') ? match[:type] : nil\n          type = type_categorizer.call(type_match)\n          unless Overcommit::Hook::MESSAGE_TYPES.include?(type)\n            raise Overcommit::Exceptions::MessageProcessingError,\n                  \"Invalid message type '#{type}' for '#{message}': must \" \\\n                  \"be one of #{Overcommit::Hook::MESSAGE_TYPES.inspect}\"\n          end\n          type\n        else\n          :error # Assume error since no categorizer was defined\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":49,"sourceCodeEnd":79,"githubUrl":"https://github.com/sds/overcommit/blob/fee0cd74b26eb81f64b43b7fab17bbb541575cc4/lib/overcommit/utils/messages_utils.rb#L49-L79","documentation":"Error \"Invalid message type '#{type}' for '#{message}': must be one of #{Overcommit::Hook::MESSAGE_TYPES.inspect}\" thrown in sds/overcommit.","triggerScenarios":"Thrown at lib/overcommit/utils/messages_utils.rb:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the message type to one of the valid types: :error or :warning.","Map the tool's severity strings to valid Overcommit message types in your hook's `extract_messages` implementation."],"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"}