1 | import { HttpResponse } from "../Primitives/Http";
|
2 | export declare function printError(err: Error): string;
|
3 | export declare function throwError(errName: RavenErrorType): never;
|
4 | export declare function throwError(errName: RavenErrorType, message: string): never;
|
5 | export declare function throwError(errName: RavenErrorType, message: string, errCause?: Error): never;
|
6 | export declare function throwError(errName: RavenErrorType, message: string, errCause?: Error, info?: {
|
7 | [key: string]: any;
|
8 | }): never;
|
9 | export declare function getError(errName: RavenErrorType, message: string): Error;
|
10 | export declare function getError(errName: string, message: string, errCause?: Error, info?: {
|
11 | [key: string]: any;
|
12 | }): Error;
|
13 | export declare function getError(errName: string, message: string, errCause?: Error): Error;
|
14 | export declare type RavenErrorType = "RavenException" | "NotSupportedException" | "InvalidOperationException" | "InvalidArgumentException" | "ErrorResponseException" | "DocumentDoesNotExistsException" | "NonUniqueObjectException" | "ConcurrencyException" | "ArgumentNullException" | "ArgumentOutOfRangeException" | "DatabaseDoesNotExistException" | "ClientVersionMismatchException" | "AuthorizationException" | "IndexDoesNotExistException" | "DatabaseLoadTimeoutException" | "AuthenticationException" | "BadRequestException" | "BulkInsertAbortedException" | "BulkInsertProtocolViolationException" | "IndexCompilationException" | "TransformerCompilationException" | "DocumentConflictException" | "DocumentDoesNotExistException" | "DocumentParseException" | "IndexInvalidException" | "IndexOrTransformerAlreadyExistException" | "JavaScriptException" | "JavaScriptParseException" | "SubscriptionClosedException" | "SubscriptionDoesNotBelongToNodeException" | "SubscriptionChangeVectorUpdateConcurrencyException" | "SubscriptionDoesNotExistException" | "SubscriptionInvalidStateException" | "SubscriptionException" | "SubscriberErrorException" | "SubscriptionInUseException" | "TransformerDoesNotExistException" | "VersioningDisabledException" | "TopologyNodeDownException" | "AllTopologyNodesDownException" | "BadResponseException" | "ChangeProcessingException" | "CommandExecutionException" | "NoLeaderException" | "CompilationException" | "ConflictException" | "DatabaseConcurrentLoadTimeoutException" | "DatabaseDisabledException" | "DatabaseLoadFailureException" | "DatabaseNotFoundException" | "NotSupportedOsException" | "SecurityException" | "ServerLoadFailureException" | "UnsuccessfulRequestException" | "CriticalIndexingException" | "IndexAnalyzerException" | "IndexCorruptionException" | "IndexOpenException" | "IndexWriteException" | "IndexWriterCreationException" | "StorageException" | "StreamDisposedException" | "LowMemoryException" | "IncorrectDllException" | "DiskFullException" | "InvalidJournalFlushRequestException" | "QuotaException" | "VoronUnrecoverableErrorException" | "NonDurableFileSystemException" | "TimeoutException" | "AggregateException" | "OperationCancelledException" | "MappingError" | "UrlScrappingError" | "TestDriverTearDownError" | "FileNotFoundException" | "NotImplementedException" | "NodeIsPassiveException" | "ConfigurationException" | "CertificateNameMismatchException" | "BulkInsertStreamError" | "NotSupportedException" | "AttachmentDoesNotExistException" | "CounterOverflowException";
|
15 | export interface ExceptionSchema {
|
16 | url: string;
|
17 | type: string;
|
18 | message: string;
|
19 | error: string;
|
20 | }
|
21 | export interface ExceptionDispatcherArgs {
|
22 | message: string;
|
23 | url: string;
|
24 | error?: string;
|
25 | type?: string;
|
26 | }
|
27 | export declare class ExceptionDispatcher {
|
28 | private static _jsonSerializer;
|
29 | static get(schema: ExceptionDispatcherArgs, code: number): Error;
|
30 | static throwException(response: HttpResponse, body: string): void | never;
|
31 | private static _getConflictError;
|
32 | private static _getType;
|
33 | }
|