1 | export interface IHttpErrorCode {
|
2 | title: string;
|
3 | status: number;
|
4 | message: string;
|
5 | }
|
6 | export interface IStatusError {
|
7 | statusCode: number;
|
8 | }
|
9 | export interface ICodeError {
|
10 | code: string;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare class AbstractMethodError extends TypeError {
|
17 | constructor(message?: string);
|
18 | }
|
19 | /**
|
20 | * @classdesc Abstract Class Exception
|
21 | * @class
|
22 | * @augments Error
|
23 | *
|
24 | */
|
25 | export declare class AbstractClassError extends TypeError {
|
26 | constructor(message?: string);
|
27 | }
|
28 | /**
|
29 | * @class
|
30 | * @augments Error
|
31 | */
|
32 | export declare class FileNotFoundError extends Error {
|
33 | constructor(message?: string);
|
34 | }
|
35 | /**
|
36 | * @class
|
37 | * @augments Error
|
38 | */
|
39 | export declare class HttpError extends Error implements IStatusError {
|
40 | |
41 |
|
42 |
|
43 |
|
44 | static create(err: any): HttpError;
|
45 | |
46 |
|
47 |
|
48 | title: string;
|
49 | |
50 |
|
51 |
|
52 | statusCode: number;
|
53 | |
54 |
|
55 |
|
56 | innerMessage: string;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | constructor(status?: number, message?: string, innerMessage?: string);
|
64 | }
|
65 | /**
|
66 | * @classdesc HTTP 400 Bad Request exception class
|
67 | * @class
|
68 | */
|
69 | export declare class HttpBadRequestError extends HttpError {
|
70 | |
71 |
|
72 |
|
73 |
|
74 |
|
75 | constructor(message?: string, innerMessage?: string);
|
76 | }
|
77 | /**
|
78 | * @classdesc HTTP 404 Not Found Exception class
|
79 | * @class
|
80 | * @augments HttpError
|
81 | */
|
82 | export declare class HttpNotFoundError extends HttpError {
|
83 | |
84 |
|
85 |
|
86 |
|
87 |
|
88 | constructor(message?: string, innerMessage?: string);
|
89 | /**
|
90 | * Gets or sets the resource which could not to be found
|
91 | */
|
92 | resource: string;
|
93 | }
|
94 | /**
|
95 | * @classdesc HTTP 405 Method Not Allowed exception class
|
96 | * @class
|
97 | * @augments HttpError
|
98 | */
|
99 | export declare class HttpMethodNotAllowedError extends HttpError {
|
100 | |
101 |
|
102 |
|
103 |
|
104 |
|
105 | constructor(message?: string, innerMessage?: string);
|
106 | }
|
107 | /**
|
108 | * @classdesc HTTP 406 Not Acceptable exception class
|
109 | * @class
|
110 | * @augments HttpError
|
111 | */
|
112 | export declare class HttpNotAcceptableError extends HttpError {
|
113 | |
114 |
|
115 |
|
116 |
|
117 |
|
118 | constructor(message?: string, innerMessage?: string);
|
119 | }
|
120 | /**
|
121 | * @classdesc HTTP 408 RequestTimeout exception class
|
122 | * @class
|
123 | * @augments HttpError
|
124 | */
|
125 | export declare class HttpRequestTimeoutError extends HttpError {
|
126 | |
127 |
|
128 |
|
129 |
|
130 |
|
131 | constructor(message?: string, innerMessage?: string);
|
132 | }
|
133 | /**
|
134 | * @classdesc HTTP 409 Conflict exception class
|
135 | * @class
|
136 | * @augments HttpError
|
137 | */
|
138 | export declare class HttpConflictError extends HttpError {
|
139 | |
140 |
|
141 |
|
142 |
|
143 |
|
144 | constructor(message?: string, innerMessage?: string);
|
145 | }
|
146 | /**
|
147 | * @classdesc HTTP 498 Token Expired exception class
|
148 | * @class
|
149 | * @augments HttpError
|
150 | */
|
151 | export declare class HttpTokenExpiredError extends HttpError {
|
152 | |
153 |
|
154 |
|
155 |
|
156 |
|
157 | constructor(message?: string, innerMessage?: string);
|
158 | }
|
159 | /**
|
160 | * @classdesc HTTP 499 Token Required exception class
|
161 | * @class
|
162 | * @augments HttpError
|
163 | */
|
164 | export declare class HttpTokenRequiredError extends HttpError {
|
165 | |
166 |
|
167 |
|
168 |
|
169 |
|
170 | constructor(message?: string, innerMessage?: string);
|
171 | }
|
172 | /**
|
173 | * @classdesc HTTP 401 Unauthorized Exception class
|
174 | * @class
|
175 | * @augments HttpError
|
176 | */
|
177 | export declare class HttpUnauthorizedError extends HttpError {
|
178 | |
179 |
|
180 |
|
181 |
|
182 |
|
183 | constructor(message?: string, innerMessage?: string);
|
184 | }
|
185 | /**
|
186 | * HTTP 403 Forbidden Exception class
|
187 | * @class
|
188 | * @param {string=} message
|
189 | * @param {string=} innerMessage
|
190 | * @augments HttpError
|
191 | */
|
192 | export declare class HttpForbiddenError extends HttpError {
|
193 | |
194 |
|
195 |
|
196 |
|
197 |
|
198 | constructor(message?: string, innerMessage?: string);
|
199 | }
|
200 | /**
|
201 | * @classdesc HTTP 500 Internal Server Error Exception class
|
202 | * @class
|
203 | * @augments HttpError
|
204 | */
|
205 | export declare class HttpServerError extends HttpError {
|
206 | |
207 |
|
208 |
|
209 |
|
210 |
|
211 | constructor(message?: string, innerMessage?: string);
|
212 | }
|
213 | /**
|
214 | * @classdesc Extends Error object for throwing exceptions on data operations
|
215 | * @class
|
216 | * @property {string} code - A string that represents an error code e.g. EDATA
|
217 | * @property {string} message - The error message.
|
218 | * @property {string} innerMessage - The error inner message.
|
219 | * @property {number} status - A number that represents an error status. This error status may be used for throwing the appropriate HTTP error.
|
220 | * @augments Error
|
221 | */
|
222 | export declare class DataError extends Error implements IStatusError, ICodeError {
|
223 | |
224 |
|
225 |
|
226 | statusCode: number;
|
227 | |
228 |
|
229 |
|
230 | code: string;
|
231 | |
232 |
|
233 |
|
234 | model: string;
|
235 | |
236 |
|
237 |
|
238 | field: string;
|
239 | |
240 |
|
241 |
|
242 | innerMessage: string;
|
243 | constructor(code?: string, message?: string, innerMessage?: string, model?: string, field?: string);
|
244 | }
|
245 | /**
|
246 | * @classdesc Extends Error object for throwing not null exceptions.
|
247 | * @class
|
248 | * @property {string} code - A string that represents an error code. The default error code is ENULL.
|
249 | * @property {string} message - The error message.
|
250 | * @property {string} innerMessage - The error inner message.
|
251 | * @property {number} status - A number that represents an error status. This error status may be used for throwing the appropriate HTTP error. The default status is 409 (Conflict)
|
252 | * @property {string} model - The target model name
|
253 | * @property {string} field - The target field name
|
254 | * @augments DataError
|
255 | */
|
256 | export declare class NotNullError extends DataError {
|
257 | |
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 | constructor(message?: string, innerMessage?: string, model?: string, field?: string);
|
265 | }
|
266 | /**
|
267 | * @classdesc Extends Error object for throwing not found exceptions.
|
268 | * @class
|
269 | * @property {string} code - A string that represents an error code. The default error code is EFOUND.
|
270 | * @property {string} message - The error message.
|
271 | * @property {string} innerMessage - The error inner message.
|
272 | * @property {number} status - A number that represents an error status. This error status may be used for throwing the appropriate HTTP error. The default status is 404 (Conflict)
|
273 | * @property {string} model - The target model name
|
274 | * @augments DataError
|
275 | */
|
276 | export declare class DataNotFoundError extends DataError {
|
277 | |
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 | constructor(message?: string, innerMessage?: string, model?: string);
|
284 | }
|
285 | /**
|
286 | * @classdesc Extends Error object for throwing unique constraint exceptions.
|
287 | * @class
|
288 | * @property {string} code - A string that represents an error code. The default error code is ENULL.
|
289 | * @property {string} message - The error message.
|
290 | * @property {string} innerMessage - The error inner message.
|
291 | * @property {number} status - A number that represents an error status. This error status may be used for throwing the appropriate HTTP error. The default status is 409 (Conflict)
|
292 | * @property {string} model - The target model name
|
293 | * @property {string} constraint - The target constraint name
|
294 | * @augments DataError
|
295 | */
|
296 | export declare class UniqueConstraintError extends DataError {
|
297 | |
298 |
|
299 |
|
300 | constraint: string;
|
301 | constructor(message?: string, innerMessage?: string, model?: string, constraint?: string);
|
302 | }
|
303 | /**
|
304 | * @classdesc Represents an access denied data exception.
|
305 | * @class
|
306 | *
|
307 | * @param {string=} message - The error message
|
308 | * @param {string=} innerMessage - The error inner message
|
309 | * @property {string} code - A string that represents an error code. The error code is EACCESS.
|
310 | * @property {number} status - A number that represents an error status. The error status is 401.
|
311 | * @property {string} message - The error message.
|
312 | * @property {string} innerMessage - The error inner message.
|
313 | * @augments DataError
|
314 | */
|
315 | export declare class AccessDeniedError extends DataError {
|
316 | constructor(message?: string, innerMessage?: string);
|
317 | }
|