UNPKG

@unstoppabledomains/resolution

Version:
24 lines (23 loc) 1.01 kB
import { DnsRecordType } from '../types/publicTypes'; /** Explains DnsRecords Error options */ declare type DnsRecordsErrorOptions = { recordType?: DnsRecordType; }; export declare enum DnsRecordsErrorCode { InconsistentTtl = "InconsistentTtl", DnsRecordCorrupted = "DnsRecordCorrupted" } /** * Configuration Error class is designed to control every error being thrown by wrong configurations for objects * @param code - Error Code * - IncorrectProvider - When provider doesn't have implemented send or sendAsync methods * - UnsupportedNetwork - When network is not specified or not supported * - UnspecifiedUrl - When url is not specified for custom naming service configurations * @param method - optional param to specify which namingService errored out */ export declare class DnsRecordsError extends Error { readonly code: DnsRecordsErrorCode; readonly method?: string; constructor(code: DnsRecordsErrorCode, options?: DnsRecordsErrorOptions); } export default DnsRecordsError;