{"record":{"id":"c463349f9e46b6c5","repo":"bensheldon/good_job","slug":"e-class-e-message","errorCode":null,"errorMessage":"#{e.class}: #{e.message}","messagePattern":"#\\{e\\.class\\}: #\\{e\\.message\\}","errorType":"exception","errorClass":"GoodJob::SdNotify::NotifyError","httpStatus":null,"severity":"error","filePath":"lib/good_job/sd_notify.rb","lineNumber":151,"sourceCode":"  #\n  # @raise [NotifyError] if there was an error communicating with the systemd\n  #   socket\n  #\n  # @see https://www.freedesktop.org/software/systemd/man/sd_notify.html\n  def self.notify(state, unset_env=false)\n    sock = ENV[\"NOTIFY_SOCKET\"]\n\n    return nil if !sock\n\n    ENV.delete(\"NOTIFY_SOCKET\") if unset_env\n\n    begin\n      Addrinfo.unix(sock, :DGRAM).connect do |s|\n        s.close_on_exec = true\n        s.write(state)\n      end\n    rescue StandardError => e\n      raise NotifyError, \"#{e.class}: #{e.message}\", e.backtrace\n    end\n  end\nend\n\n# FORK: Finish nesting inside GoodJob.\nend\n","sourceCodeStart":133,"sourceCodeEnd":158,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/lib/good_job/sd_notify.rb#L133-L158","documentation":"Error \"#{e.class}: #{e.message}\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at lib/good_job/sd_notify.rb:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This wraps an underlying sd_notify error; read the embedded exception class and message for the cause.","Ensure NOTIFY_SOCKET is set and reachable, or do not call SdNotify outside of systemd."],"exampleFix":"# Run under systemd with NotifyAccess configured, or skip sd_notify outside systemd","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}