export declare type ScanRunErrorCodeName = 'InternalError' | 'UrlNavigationTimeout' | 'HttpErrorCode' | 'SslError' | 'ResourceLoadFailure' | 'InvalidUrl' | 'EmptyPage' | 'NavigationError' | 'InvalidContentType' | 'UrlNotResolved' | 'ScanTimeout' ; export interface ScanRunErrorCode { code : ScanRunErrorCodeName ; codeId : number ; message : string ; } export class ScanRunErrorCodes { public static internalError : ScanRunErrorCode = { code : 'InternalError' , codeId : 9001 , message : 'The scan engine encountered an internal error.' , } ; public static urlNavigationTimeout : ScanRunErrorCode = { code : 'UrlNavigationTimeout' , codeId : 9002 , message : 'The URL navigation timeout exceeded.' , } ; public static httpErrorCode : ScanRunErrorCode = { code : 'HttpErrorCode' , codeId : 9003 , message : 'Page returned an unsuccessful response code' , } ; public static sslError : ScanRunErrorCode = { code : 'SslError' , codeId : 9004 , message : 'SSL Error when navigating to scan URL' , } ; public static resourceLoadFailure : ScanRunErrorCode = { code : 'ResourceLoadFailure' , codeId : 9005 , message : 'The resource is not available at scan URL' , } ; public static invalidUrl : ScanRunErrorCode = { code : 'InvalidUrl' , codeId : 9006 , message : 'The scan URL is invalid' , } ; public static emptyPage : ScanRunErrorCode = { code : 'EmptyPage' , codeId : 9007 , message : 'No content to scan at URL' , } ; public static navigationError : ScanRunErrorCode = { code : 'NavigationError' , codeId : 9008 , message : 'Unknown error navigating to scan URL' , } ; public static invalidContentType : ScanRunErrorCode = { code : 'InvalidContentType' , codeId : 9009 , message : 'Only html content type pages are supported for scanning' , } ; public static urlNotResolved : ScanRunErrorCode = { code : 'UrlNotResolved' , codeId : 9010 , message : 'URL cannot be reached' , } ; public static scanTimedOut : ScanRunErrorCode = { code : 'ScanTimeout' , codeId : 9011 , message : 'Unable to complete scan before maximum timeout value' , } ; } export const scanErrorNameToErrorMap = { InternalError : ScanRunErrorCodes . internalError , UrlNavigationTimeout : ScanRunErrorCodes . urlNavigationTimeout , SslError : ScanRunErrorCodes . sslError , HttpErrorCode : ScanRunErrorCodes . httpErrorCode , ResourceLoadFailure : ScanRunErrorCodes . resourceLoadFailure , InvalidUrl : ScanRunErrorCodes . invalidUrl , EmptyPage : ScanRunErrorCodes . emptyPage , NavigationError : ScanRunErrorCodes . navigationError , InvalidContentType : ScanRunErrorCodes . invalidContentType , UrlNotResolved : ScanRunErrorCodes . urlNotResolved , ScanTimeout : ScanRunErrorCodes . scanTimedOut , } ;