{"record":{"id":"ddde7c2853408596","repo":"ankane/pgsync","slug":"no-destination","errorCode":null,"errorMessage":"No destination","messagePattern":"No destination","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/pgsync/sync.rb","lineNumber":31,"sourceCode":"      args = @arguments\n      opts = @options\n\n      # only resolve commands from config, not CLI arguments\n      [:to, :from].each do |opt|\n        opts[opt] ||= resolve_source(config[opt.to_s])\n      end\n\n      # merge other config\n      [:to_safe, :exclude, :schemas].each do |opt|\n        opts[opt] ||= config[opt.to_s]\n      end\n\n      if args.size > 2\n        raise Error, \"Usage:\\n    pgsync [options]\"\n      end\n\n      raise Error, \"No source\" unless source.exists?\n      raise Error, \"No destination\" unless destination.exists?\n\n      unless opts[:to_safe] || destination.local?\n        raise Error, \"Danger! Add `to_safe: true` to `.pgsync.yml` if the destination is not localhost or 127.0.0.1\"\n      end\n\n      print_description(\"From\", source)\n      print_description(\"To\", destination)\n\n      if (opts[:preserve] || opts[:overwrite]) && destination.server_version_num < 90500\n        raise Error, \"Postgres 9.5+ is required for --preserve and --overwrite\"\n      end\n\n      resolver = TaskResolver.new(args: args, opts: opts, source: source, destination: destination, config: config, first_schema: first_schema)\n      tasks =\n        resolver.tasks.map do |task|\n          Task.new(source: source, destination: destination, config: config, table: task[:table], opts: opts.merge(sql: task[:sql]))\n        end\n","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/ankane/pgsync/blob/57bdddf5db506d329b51cb3376379dc3a2559010/lib/pgsync/sync.rb#L13-L49","documentation":"Error \"No destination\" thrown in ankane/pgsync.","triggerScenarios":"Thrown at lib/pgsync/sync.rb:31 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":"57bdddf5db506d329b51cb3376379dc3a2559010","analyzedAt":"2026-08-23T11:18:48.887Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}