DnsError · Node.js
class declaration and members.
In this guide
Purpose and lifecycle
DnsError is exported from the Node package. Specialized errors inherit CrawlingoError; the base inherits JavaScript Error.
Construct with new ErrorClass(message, options?). Inherited properties include name, message, stack, cause, code and optional diagnostic context. SDK boundaries convert structured native failures to this hierarchy.
Page returns HTTP statuses, including exhausted 429/500 responses. A missing selector can return an empty collection. DatasetJob records individual failures in reports/error shards. These conditions do not automatically throw every exported error class.
Definition and availability
Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.
Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.
export class DnsError extends CrawlingoErrorConstruct and catch
import { DnsError, CrawlingoError } from 'crawlingo';
const error = new DnsError('Operation failed');
console.log(error instanceof CrawlingoError, error.message, error.code);Members
| Member | Kind | Return / value type | Source status |
|---|---|---|---|
| defaultCode | static property | "DNS_FAILED" | Present in source |
defaultCode
Default code inherited by instances of this error class.
Returns / value: "DNS_FAILED".
static readonly defaultCode = 'DNS_FAILED';Errors and operational limits
See the consuming API for validation and failure behavior. Types and enum declarations do not perform network requests by themselves.
Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.