Method: Async::DNS::Transaction#fail!
- Defined in:
- lib/async/dns/transaction.rb
#fail!(rcode) ⇒ Object
This function indicates that there was a failure to resolve the given question. The single argument must be an integer error code, typically given by the constants in Resolv::DNS::RCode.
The easiest way to use this function it to simply supply a symbol. Here is a list of the most commonly used ones:
-
‘:NoError`: No error occurred.
-
‘:FormErr`: The incoming data was not formatted correctly.
-
‘:ServFail`: The operation caused a server failure (internal error, etc).
-
‘:NXDomain`: Non-eXistant Domain (domain record does not exist).
-
‘:NotImp`: The operation requested is not implemented.
-
‘:Refused`: The operation was refused by the server.
-
‘:NotAuth`: The server is not authoritive for the zone.
See [RFC2929](www.rfc-editor.org/rfc/rfc2929.txt) for more information about DNS error codes (specifically, page 3).
**This function will complete deferred transactions.**
171 172 173 174 175 176 177 178 179 |
# File 'lib/async/dns/transaction.rb', line 171 def fail!(rcode) append_question! if rcode.kind_of? Symbol @response.rcode = Resolv::DNS::RCode.const_get(rcode) else @response.rcode = rcode.to_i end end |