@velajs/vela 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -1
- package/dist/constants.js +1 -0
- package/dist/container/container.js +4 -1
- package/dist/errors/http-exception.d.ts +20 -20
- package/dist/errors/http-exception.js +47 -41
- package/dist/health/health.service.js +2 -2
- package/dist/http/decorators.d.ts +1 -0
- package/dist/http/decorators.js +2 -1
- package/dist/http/index.d.ts +1 -1
- package/dist/http/index.js +1 -1
- package/dist/http/route.manager.js +16 -5
- package/dist/http/types.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/validation/validation.pipe.js +1 -1
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -26,6 +26,7 @@ export var HttpMethod = /*#__PURE__*/ function(HttpMethod) {
|
|
|
26
26
|
HttpMethod["DELETE"] = "delete";
|
|
27
27
|
HttpMethod["OPTIONS"] = "options";
|
|
28
28
|
HttpMethod["HEAD"] = "head";
|
|
29
|
+
HttpMethod["ALL"] = "all";
|
|
29
30
|
return HttpMethod;
|
|
30
31
|
}({});
|
|
31
32
|
export var ParamType = /*#__PURE__*/ function(ParamType) {
|
|
@@ -172,7 +172,10 @@ export class Container {
|
|
|
172
172
|
if (!registration.useFactory) {
|
|
173
173
|
throw new Error('Factory function is missing');
|
|
174
174
|
}
|
|
175
|
-
const dependencies = (registration.inject || []).map((token)=>
|
|
175
|
+
const dependencies = (registration.inject || []).map((token)=>{
|
|
176
|
+
const resolved = token instanceof ForwardRef ? token.factory() : token;
|
|
177
|
+
return this.resolve(resolved);
|
|
178
|
+
});
|
|
176
179
|
const result = registration.useFactory(...dependencies);
|
|
177
180
|
if (result instanceof Promise) {
|
|
178
181
|
throw new Error(`Async factory for ${this.tokenToString(registration.provide)} returned a Promise. ` + `Use resolveAsync() for async providers.`);
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
export declare class HttpException extends Error {
|
|
2
2
|
readonly statusCode: number;
|
|
3
|
-
readonly
|
|
4
|
-
constructor(
|
|
3
|
+
private readonly _response;
|
|
4
|
+
constructor(response: string | object, statusCode: number);
|
|
5
5
|
getStatus(): number;
|
|
6
6
|
getResponse(): unknown;
|
|
7
7
|
}
|
|
8
8
|
export declare class BadRequestException extends HttpException {
|
|
9
|
-
constructor(message?: string
|
|
9
|
+
constructor(message?: string | object);
|
|
10
10
|
}
|
|
11
11
|
export declare class UnauthorizedException extends HttpException {
|
|
12
|
-
constructor(message?: string
|
|
12
|
+
constructor(message?: string | object);
|
|
13
13
|
}
|
|
14
14
|
export declare class ForbiddenException extends HttpException {
|
|
15
|
-
constructor(message?: string
|
|
15
|
+
constructor(message?: string | object);
|
|
16
16
|
}
|
|
17
17
|
export declare class NotFoundException extends HttpException {
|
|
18
|
-
constructor(message?: string
|
|
18
|
+
constructor(message?: string | object);
|
|
19
19
|
}
|
|
20
20
|
export declare class MethodNotAllowedException extends HttpException {
|
|
21
|
-
constructor(message?: string
|
|
21
|
+
constructor(message?: string | object);
|
|
22
22
|
}
|
|
23
23
|
export declare class NotAcceptableException extends HttpException {
|
|
24
|
-
constructor(message?: string
|
|
24
|
+
constructor(message?: string | object);
|
|
25
25
|
}
|
|
26
26
|
export declare class RequestTimeoutException extends HttpException {
|
|
27
|
-
constructor(message?: string
|
|
27
|
+
constructor(message?: string | object);
|
|
28
28
|
}
|
|
29
29
|
export declare class ConflictException extends HttpException {
|
|
30
|
-
constructor(message?: string
|
|
30
|
+
constructor(message?: string | object);
|
|
31
31
|
}
|
|
32
32
|
export declare class GoneException extends HttpException {
|
|
33
|
-
constructor(message?: string
|
|
33
|
+
constructor(message?: string | object);
|
|
34
34
|
}
|
|
35
35
|
export declare class PayloadTooLargeException extends HttpException {
|
|
36
|
-
constructor(message?: string
|
|
36
|
+
constructor(message?: string | object);
|
|
37
37
|
}
|
|
38
38
|
export declare class UnsupportedMediaTypeException extends HttpException {
|
|
39
|
-
constructor(message?: string
|
|
39
|
+
constructor(message?: string | object);
|
|
40
40
|
}
|
|
41
41
|
export declare class UnprocessableEntityException extends HttpException {
|
|
42
|
-
constructor(message?: string
|
|
42
|
+
constructor(message?: string | object);
|
|
43
43
|
}
|
|
44
44
|
export declare class TooManyRequestsException extends HttpException {
|
|
45
|
-
constructor(message?: string
|
|
45
|
+
constructor(message?: string | object);
|
|
46
46
|
}
|
|
47
47
|
export declare class InternalServerErrorException extends HttpException {
|
|
48
|
-
constructor(message?: string
|
|
48
|
+
constructor(message?: string | object);
|
|
49
49
|
}
|
|
50
50
|
export declare class NotImplementedException extends HttpException {
|
|
51
|
-
constructor(message?: string
|
|
51
|
+
constructor(message?: string | object);
|
|
52
52
|
}
|
|
53
53
|
export declare class BadGatewayException extends HttpException {
|
|
54
|
-
constructor(message?: string
|
|
54
|
+
constructor(message?: string | object);
|
|
55
55
|
}
|
|
56
56
|
export declare class ServiceUnavailableException extends HttpException {
|
|
57
|
-
constructor(message?: string
|
|
57
|
+
constructor(message?: string | object);
|
|
58
58
|
}
|
|
59
59
|
export declare class GatewayTimeoutException extends HttpException {
|
|
60
|
-
constructor(message?: string
|
|
60
|
+
constructor(message?: string | object);
|
|
61
61
|
}
|
|
@@ -1,128 +1,134 @@
|
|
|
1
1
|
export class HttpException extends Error {
|
|
2
2
|
statusCode;
|
|
3
|
-
|
|
4
|
-
constructor(
|
|
5
|
-
|
|
3
|
+
_response;
|
|
4
|
+
constructor(response, statusCode){
|
|
5
|
+
const message = typeof response === 'string' ? response : JSON.stringify(response);
|
|
6
|
+
super(message);
|
|
6
7
|
this.name = 'HttpException';
|
|
8
|
+
this.statusCode = statusCode;
|
|
9
|
+
this._response = response;
|
|
7
10
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
8
11
|
}
|
|
9
12
|
getStatus() {
|
|
10
13
|
return this.statusCode;
|
|
11
14
|
}
|
|
12
15
|
getResponse() {
|
|
13
|
-
|
|
16
|
+
if (typeof this._response === 'object' && this._response !== null) {
|
|
17
|
+
return this._response;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
14
20
|
statusCode: this.statusCode,
|
|
15
|
-
message: this.
|
|
21
|
+
message: this._response
|
|
16
22
|
};
|
|
17
23
|
}
|
|
18
24
|
}
|
|
19
25
|
// 4xx
|
|
20
26
|
export class BadRequestException extends HttpException {
|
|
21
|
-
constructor(message = 'Bad Request'
|
|
22
|
-
super(message, 400
|
|
27
|
+
constructor(message = 'Bad Request'){
|
|
28
|
+
super(message, 400);
|
|
23
29
|
this.name = 'BadRequestException';
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
export class UnauthorizedException extends HttpException {
|
|
27
|
-
constructor(message = 'Unauthorized'
|
|
28
|
-
super(message, 401
|
|
33
|
+
constructor(message = 'Unauthorized'){
|
|
34
|
+
super(message, 401);
|
|
29
35
|
this.name = 'UnauthorizedException';
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
export class ForbiddenException extends HttpException {
|
|
33
|
-
constructor(message = 'Forbidden'
|
|
34
|
-
super(message, 403
|
|
39
|
+
constructor(message = 'Forbidden'){
|
|
40
|
+
super(message, 403);
|
|
35
41
|
this.name = 'ForbiddenException';
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
export class NotFoundException extends HttpException {
|
|
39
|
-
constructor(message = 'Not Found'
|
|
40
|
-
super(message, 404
|
|
45
|
+
constructor(message = 'Not Found'){
|
|
46
|
+
super(message, 404);
|
|
41
47
|
this.name = 'NotFoundException';
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
export class MethodNotAllowedException extends HttpException {
|
|
45
|
-
constructor(message = 'Method Not Allowed'
|
|
46
|
-
super(message, 405
|
|
51
|
+
constructor(message = 'Method Not Allowed'){
|
|
52
|
+
super(message, 405);
|
|
47
53
|
this.name = 'MethodNotAllowedException';
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
56
|
export class NotAcceptableException extends HttpException {
|
|
51
|
-
constructor(message = 'Not Acceptable'
|
|
52
|
-
super(message, 406
|
|
57
|
+
constructor(message = 'Not Acceptable'){
|
|
58
|
+
super(message, 406);
|
|
53
59
|
this.name = 'NotAcceptableException';
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
export class RequestTimeoutException extends HttpException {
|
|
57
|
-
constructor(message = 'Request Timeout'
|
|
58
|
-
super(message, 408
|
|
63
|
+
constructor(message = 'Request Timeout'){
|
|
64
|
+
super(message, 408);
|
|
59
65
|
this.name = 'RequestTimeoutException';
|
|
60
66
|
}
|
|
61
67
|
}
|
|
62
68
|
export class ConflictException extends HttpException {
|
|
63
|
-
constructor(message = 'Conflict'
|
|
64
|
-
super(message, 409
|
|
69
|
+
constructor(message = 'Conflict'){
|
|
70
|
+
super(message, 409);
|
|
65
71
|
this.name = 'ConflictException';
|
|
66
72
|
}
|
|
67
73
|
}
|
|
68
74
|
export class GoneException extends HttpException {
|
|
69
|
-
constructor(message = 'Gone'
|
|
70
|
-
super(message, 410
|
|
75
|
+
constructor(message = 'Gone'){
|
|
76
|
+
super(message, 410);
|
|
71
77
|
this.name = 'GoneException';
|
|
72
78
|
}
|
|
73
79
|
}
|
|
74
80
|
export class PayloadTooLargeException extends HttpException {
|
|
75
|
-
constructor(message = 'Payload Too Large'
|
|
76
|
-
super(message, 413
|
|
81
|
+
constructor(message = 'Payload Too Large'){
|
|
82
|
+
super(message, 413);
|
|
77
83
|
this.name = 'PayloadTooLargeException';
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
export class UnsupportedMediaTypeException extends HttpException {
|
|
81
|
-
constructor(message = 'Unsupported Media Type'
|
|
82
|
-
super(message, 415
|
|
87
|
+
constructor(message = 'Unsupported Media Type'){
|
|
88
|
+
super(message, 415);
|
|
83
89
|
this.name = 'UnsupportedMediaTypeException';
|
|
84
90
|
}
|
|
85
91
|
}
|
|
86
92
|
export class UnprocessableEntityException extends HttpException {
|
|
87
|
-
constructor(message = 'Unprocessable Entity'
|
|
88
|
-
super(message, 422
|
|
93
|
+
constructor(message = 'Unprocessable Entity'){
|
|
94
|
+
super(message, 422);
|
|
89
95
|
this.name = 'UnprocessableEntityException';
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
98
|
export class TooManyRequestsException extends HttpException {
|
|
93
|
-
constructor(message = 'Too Many Requests'
|
|
94
|
-
super(message, 429
|
|
99
|
+
constructor(message = 'Too Many Requests'){
|
|
100
|
+
super(message, 429);
|
|
95
101
|
this.name = 'TooManyRequestsException';
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
// 5xx
|
|
99
105
|
export class InternalServerErrorException extends HttpException {
|
|
100
|
-
constructor(message = 'Internal Server Error'
|
|
101
|
-
super(message, 500
|
|
106
|
+
constructor(message = 'Internal Server Error'){
|
|
107
|
+
super(message, 500);
|
|
102
108
|
this.name = 'InternalServerErrorException';
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
export class NotImplementedException extends HttpException {
|
|
106
|
-
constructor(message = 'Not Implemented'
|
|
107
|
-
super(message, 501
|
|
112
|
+
constructor(message = 'Not Implemented'){
|
|
113
|
+
super(message, 501);
|
|
108
114
|
this.name = 'NotImplementedException';
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
export class BadGatewayException extends HttpException {
|
|
112
|
-
constructor(message = 'Bad Gateway'
|
|
113
|
-
super(message, 502
|
|
118
|
+
constructor(message = 'Bad Gateway'){
|
|
119
|
+
super(message, 502);
|
|
114
120
|
this.name = 'BadGatewayException';
|
|
115
121
|
}
|
|
116
122
|
}
|
|
117
123
|
export class ServiceUnavailableException extends HttpException {
|
|
118
|
-
constructor(message = 'Service Unavailable'
|
|
119
|
-
super(message, 503
|
|
124
|
+
constructor(message = 'Service Unavailable'){
|
|
125
|
+
super(message, 503);
|
|
120
126
|
this.name = 'ServiceUnavailableException';
|
|
121
127
|
}
|
|
122
128
|
}
|
|
123
129
|
export class GatewayTimeoutException extends HttpException {
|
|
124
|
-
constructor(message = 'Gateway Timeout'
|
|
125
|
-
super(message, 504
|
|
130
|
+
constructor(message = 'Gateway Timeout'){
|
|
131
|
+
super(message, 504);
|
|
126
132
|
this.name = 'GatewayTimeoutException';
|
|
127
133
|
}
|
|
128
134
|
}
|
|
@@ -19,7 +19,7 @@ export class HealthCheckService {
|
|
|
19
19
|
error: {},
|
|
20
20
|
details: {}
|
|
21
21
|
};
|
|
22
|
-
throw new ServiceUnavailableException(
|
|
22
|
+
throw new ServiceUnavailableException(result);
|
|
23
23
|
}
|
|
24
24
|
const results = await Promise.allSettled(indicators.map((fn)=>fn()));
|
|
25
25
|
const info = {};
|
|
@@ -55,7 +55,7 @@ export class HealthCheckService {
|
|
|
55
55
|
details
|
|
56
56
|
};
|
|
57
57
|
if (status === 'error') {
|
|
58
|
-
throw new ServiceUnavailableException(
|
|
58
|
+
throw new ServiceUnavailableException(checkResult);
|
|
59
59
|
}
|
|
60
60
|
return checkResult;
|
|
61
61
|
}
|
|
@@ -38,6 +38,7 @@ export declare const Patch: (path?: string) => MethodDecorator;
|
|
|
38
38
|
export declare const Delete: (path?: string) => MethodDecorator;
|
|
39
39
|
export declare const Options: (path?: string) => MethodDecorator;
|
|
40
40
|
export declare const Head: (path?: string) => MethodDecorator;
|
|
41
|
+
export declare const All: (path?: string) => MethodDecorator;
|
|
41
42
|
export declare const Sse: (path?: string) => MethodDecorator;
|
|
42
43
|
export declare const Param: (nameOrPipe?: string | PipeType, ...pipes: PipeType[]) => ParameterDecorator;
|
|
43
44
|
export declare const Query: (nameOrPipe?: string | PipeType, ...pipes: PipeType[]) => ParameterDecorator;
|
package/dist/http/decorators.js
CHANGED
|
@@ -22,7 +22,7 @@ function normalizePath(path) {
|
|
|
22
22
|
if (typeof prefixOrOptions === 'string') {
|
|
23
23
|
prefix = prefixOrOptions;
|
|
24
24
|
} else if (prefixOrOptions) {
|
|
25
|
-
prefix = prefixOrOptions.prefix ?? '';
|
|
25
|
+
prefix = prefixOrOptions.path ?? prefixOrOptions.prefix ?? '';
|
|
26
26
|
version = prefixOrOptions.version;
|
|
27
27
|
} else {
|
|
28
28
|
prefix = '';
|
|
@@ -96,6 +96,7 @@ export const Patch = createMethodDecorator(HttpMethod.PATCH);
|
|
|
96
96
|
export const Delete = createMethodDecorator(HttpMethod.DELETE);
|
|
97
97
|
export const Options = createMethodDecorator(HttpMethod.OPTIONS);
|
|
98
98
|
export const Head = createMethodDecorator(HttpMethod.HEAD);
|
|
99
|
+
export const All = createMethodDecorator(HttpMethod.ALL);
|
|
99
100
|
export const Sse = createMethodDecorator(HttpMethod.GET);
|
|
100
101
|
// Parameter decorators
|
|
101
102
|
const CUSTOM_PARAM_TYPE = 'custom';
|
package/dist/http/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { RouteManager } from './route.manager';
|
|
2
2
|
export { MiddlewareBuilder, RequestMethod } from './middleware-consumer';
|
|
3
3
|
export type { MiddlewareConsumer, MiddlewareConfigProxy, RouteInfo, NestModule, MiddlewareRouteDefinition } from './middleware-consumer';
|
|
4
|
-
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, isController, } from './decorators';
|
|
4
|
+
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, All, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, isController, } from './decorators';
|
|
5
5
|
export type { RouteMetadata, ControllerMetadata, ControllerOptions, ParamMetadata, ControllerRegistration, } from './types';
|
package/dist/http/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { RouteManager } from "./route.manager.js";
|
|
2
2
|
export { MiddlewareBuilder, RequestMethod } from "./middleware-consumer.js";
|
|
3
|
-
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, isController } from "./decorators.js";
|
|
3
|
+
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, All, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, isController } from "./decorators.js";
|
|
@@ -352,10 +352,17 @@ export class RouteManager {
|
|
|
352
352
|
case ParamType.QUERY:
|
|
353
353
|
return param.name ? c.req.query(param.name) : c.req.query();
|
|
354
354
|
case ParamType.BODY:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
{
|
|
356
|
+
let body;
|
|
357
|
+
try {
|
|
358
|
+
body = await c.req.json();
|
|
359
|
+
} catch {
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
|
362
|
+
if (param.name && body !== null && typeof body === 'object') {
|
|
363
|
+
return body[param.name];
|
|
364
|
+
}
|
|
365
|
+
return body;
|
|
359
366
|
}
|
|
360
367
|
case ParamType.HEADERS:
|
|
361
368
|
if (param.name) {
|
|
@@ -432,7 +439,11 @@ export class RouteManager {
|
|
|
432
439
|
app.options(normalizedPath, handler);
|
|
433
440
|
break;
|
|
434
441
|
case HttpMethod.HEAD:
|
|
435
|
-
|
|
442
|
+
// Hono converts HEAD to GET internally, so register as GET
|
|
443
|
+
app.get(normalizedPath, handler);
|
|
444
|
+
break;
|
|
445
|
+
case HttpMethod.ALL:
|
|
446
|
+
app.all(normalizedPath, handler);
|
|
436
447
|
break;
|
|
437
448
|
default:
|
|
438
449
|
app.on(method.toUpperCase(), normalizedPath, handler);
|
package/dist/http/types.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { VelaApplication } from './application';
|
|
|
5
5
|
export { Container, Injectable, Inject, Optional, InjectionToken, ForwardRef, forwardRef, ModuleRef, mixin } from './container/index';
|
|
6
6
|
export type { Type, Token, InjectableOptions, ProviderOptions, } from './container/index';
|
|
7
7
|
export { METADATA_KEYS, HttpMethod, ParamType, Scope } from './constants';
|
|
8
|
-
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, } from './http/index';
|
|
8
|
+
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, All, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators, } from './http/index';
|
|
9
9
|
export { Logger, LogLevel } from './services/index';
|
|
10
10
|
export type { LoggerService } from './services/index';
|
|
11
11
|
export { ConfigModule, ConfigService, CONFIG_OPTIONS } from './config/index';
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { Container, Injectable, Inject, Optional, InjectionToken, ForwardRef, fo
|
|
|
8
8
|
// Constants
|
|
9
9
|
export { METADATA_KEYS, HttpMethod, ParamType, Scope } from "./constants.js";
|
|
10
10
|
// HTTP Decorators
|
|
11
|
-
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators } from "./http/index.js";
|
|
11
|
+
export { Controller, Version, Get, Post, Put, Patch, Delete, Options, Head, All, Sse, Param, Query, Body, Headers, Req, Res, Ip, Cookie, Cookies, RawBody, HttpCode, Header, Redirect, createParamDecorator, applyDecorators } from "./http/index.js";
|
|
12
12
|
// Services
|
|
13
13
|
export { Logger, LogLevel } from "./services/index.js";
|
|
14
14
|
// Config
|
|
@@ -7,7 +7,7 @@ export class ValidationPipe {
|
|
|
7
7
|
return metatype.schema.parse(value);
|
|
8
8
|
} catch (error) {
|
|
9
9
|
if (error && typeof error === 'object' && 'issues' in error && Array.isArray(error.issues)) {
|
|
10
|
-
throw new BadRequestException(
|
|
10
|
+
throw new BadRequestException({
|
|
11
11
|
statusCode: 400,
|
|
12
12
|
message: 'Validation failed',
|
|
13
13
|
errors: error.issues
|