forked from canada-ca/tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.d.ts
More file actions
96 lines (96 loc) · 2.21 KB
/
Copy patherror.d.ts
File metadata and controls
96 lines (96 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**
* ```ts
* import type { ArangoError, HttpError } from "arangojs/error";
* ```
*
* The "error" module provides types and interfaces for TypeScript related
* to arangojs error handling.
*
* @packageDocumentation
*/
import { ExtendableError } from "./lib/error";
/**
* Indicates whether the given value represents an {@link ArangoError}.
*
* @param error - A value that might be an `ArangoError`.
*/
export declare function isArangoError(error: any): error is ArangoError;
/**
* Indicates whether the given value represents an ArangoDB error response.
*
* @internal
*/
export declare function isArangoErrorResponse(body: any): boolean;
/**
* Indicates whether the given value represents a Node.js `SystemError`.
*/
export declare function isSystemError(err: any): err is SystemError;
/**
* Interface representing a Node.js `SystemError`.
*/
export interface SystemError extends Error {
code: string;
errno: number | string;
syscall: string;
}
/**
* Represents an error returned by ArangoDB.
*/
export declare class ArangoError extends ExtendableError {
name: string;
/**
* ArangoDB error code.
*
* See {@link https://www.arangodb.com/docs/stable/appendix-error-codes.html | ArangoDB error documentation}.
*/
errorNum: number;
/**
* HTTP status code included in the server error response object.
*/
code: number;
/**
* Server response object.
*/
response: any;
/**
* @internal
* @hidden
*/
constructor(response: any);
/**
* @internal
*
* Indicates that this object represents an ArangoDB error.
*/
get isArangoError(): true;
toJSON(): {
error: boolean;
errorMessage: string;
errorNum: number;
code: number;
};
}
/**
* Represents a plain HTTP error response.
*/
export declare class HttpError extends ExtendableError {
name: string;
/**
* Server response object.
*/
response: any;
/**
* HTTP status code of the server response.
*/
code: number;
/**
* @internal
* @hidden
*/
constructor(response: any);
toJSON(): {
error: boolean;
code: number;
};
}
//# sourceMappingURL=error.d.ts.map