{"record":{"id":"c9d4dc74799ae7d4","repo":"ytti/oxidized","slug":"hook-topic-arn-is-required","errorCode":null,"errorMessage":"hook.topic_arn is required","messagePattern":"hook\\.topic_arn is required","errorType":"validation","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/hook/awssns.rb","lineNumber":6,"sourceCode":"require 'aws-sdk'\n\nclass AwsSns < Oxidized::Hook\n  def validate_cfg!\n    raise KeyError, 'hook.region is required' unless cfg.has_key?('region')\n    raise KeyError, 'hook.topic_arn is required' unless cfg.has_key?('topic_arn')\n  end\n\n  def run_hook(ctx)\n    sns = Aws::SNS::Resource.new(region: cfg.region)\n    topic = sns.topic(cfg.topic_arn)\n    message = {\n      event: ctx.event.to_s\n    }\n    if ctx.node\n      message.merge!(\n        group: ctx.node.group.to_s,\n        model: ctx.node.model.class.name.to_s.downcase,\n        node:  ctx.node.name.to_s\n      )\n    end\n    topic.publish(\n      message: message.to_json\n    )","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/hook/awssns.rb#L1-L24","documentation":"Error \"hook.topic_arn is required\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/hook/awssns.rb:6 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":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}