Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception deleting A Records #12

Open
ey-pairing opened this issue Apr 10, 2012 · 0 comments
Open

Exception deleting A Records #12

ey-pairing opened this issue Apr 10, 2012 · 0 comments

Comments

@ey-pairing
Copy link

I have 404 Resource Not Found: {"status": "failure", "data": null, "job_id": null, "msgs": [{"INFO": "Unknown resource ARecordRecord (Requested URI: /REST/ARecordRecord/engineyard.com/x.engineyard.com)", "SOURCE": "API-A", "ERR_CD": "INVALID_REQUEST", "LVL": "ERROR"}]} with 404
/Users/ey/.rvm/gems/ruby-1.8.7-p358/gems/dynect_rest-0.4.1/lib/dynect_rest.rb:211:in `parse_response': Request failed: ERROR INVALID_REQUEST API-A - Unknown resource ARecordRecord (Requested URI: /REST/ARecordRecord/engineyard.com/x.engineyard.com) (DynectRest::Exceptions::RequestFailed)
    from /Users/ey/.rvm/gems/ruby-1.8.7-p358/gems/dynect_rest-0.4.1/lib/dynect_rest.rb:199:in `api_request'
    from /Users/ey/.rvm/gems/ruby-1.8.7-p358/gems/dynect_rest-0.4.1/lib/dynect_rest.rb:171:in `post'
    from /Users/ey/.rvm/gems/ruby-1.8.7-p358/gems/dynect_rest-0.4.1/lib/dynect_rest/resource.rb:111:in `save'

seems like it would be fixed by the following monkey patch:

class DynectRest::Resource
  def resource_path(full=false)
    if (full == true || full == :full) 
      "/REST/#{@record_type}/#{@zone}"
    else
      "#{@record_type}/#{@zone}"
    end
  end
end

Despite a successful return code, it does not actually delete the record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant