1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.HttpErrorContext = exports.AnalyticsErrorContext = exports.SearchErrorContext = exports.QueryErrorContext = exports.ViewErrorContext = exports.KeyValueErrorContext = exports.ErrorContext = void 0;
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | class ErrorContext {
|
10 | }
|
11 | exports.ErrorContext = ErrorContext;
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | class KeyValueErrorContext extends ErrorContext {
|
18 | |
19 |
|
20 |
|
21 | constructor(data) {
|
22 | super();
|
23 | this.status_code = data.status_code;
|
24 | this.opaque = data.opaque;
|
25 | this.cas = data.cas;
|
26 | this.key = data.key;
|
27 | this.bucket = data.bucket;
|
28 | this.collection = data.collection;
|
29 | this.scope = data.scope;
|
30 | this.context = data.context;
|
31 | this.ref = data.ref;
|
32 | }
|
33 | }
|
34 | exports.KeyValueErrorContext = KeyValueErrorContext;
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | class ViewErrorContext extends ErrorContext {
|
41 | |
42 |
|
43 |
|
44 | constructor(data) {
|
45 | super();
|
46 | this.design_document = data.design_document;
|
47 | this.view = data.view;
|
48 | this.parameters = data.parameters;
|
49 | this.http_response_code = data.http_response_code;
|
50 | this.http_response_body = data.http_response_body;
|
51 | }
|
52 | }
|
53 | exports.ViewErrorContext = ViewErrorContext;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | class QueryErrorContext extends ErrorContext {
|
60 | |
61 |
|
62 |
|
63 | constructor(data) {
|
64 | super();
|
65 | this.statement = data.statement;
|
66 | this.client_context_id = data.client_context_id;
|
67 | this.parameters = data.parameters;
|
68 | this.http_response_code = data.http_response_code;
|
69 | this.http_response_body = data.http_response_body;
|
70 | }
|
71 | }
|
72 | exports.QueryErrorContext = QueryErrorContext;
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | class SearchErrorContext extends ErrorContext {
|
79 | |
80 |
|
81 |
|
82 | constructor(data) {
|
83 | super();
|
84 | this.index_name = data.index_name;
|
85 | this.query = data.query;
|
86 | this.parameters = data.parameters;
|
87 | this.http_response_code = data.http_response_code;
|
88 | this.http_response_body = data.http_response_body;
|
89 | }
|
90 | }
|
91 | exports.SearchErrorContext = SearchErrorContext;
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | class AnalyticsErrorContext extends ErrorContext {
|
98 | |
99 |
|
100 |
|
101 | constructor(data) {
|
102 | super();
|
103 | this.statement = data.statement;
|
104 | this.client_context_id = data.client_context_id;
|
105 | this.parameters = data.parameters;
|
106 | this.http_response_code = data.http_response_code;
|
107 | this.http_response_body = data.http_response_body;
|
108 | }
|
109 | }
|
110 | exports.AnalyticsErrorContext = AnalyticsErrorContext;
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | class HttpErrorContext extends ErrorContext {
|
117 | |
118 |
|
119 |
|
120 | constructor(data) {
|
121 | super();
|
122 | this.method = data.method;
|
123 | this.request_path = data.request_path;
|
124 | this.response_code = data.response_code;
|
125 | this.response_body = data.response_body;
|
126 | }
|
127 | }
|
128 | exports.HttpErrorContext = HttpErrorContext;
|