Comparing version 2.0.29 to 2.0.30
@@ -37,7 +37,7 @@ "use strict"; | ||
case 'body': | ||
return (0, error_1.httpError)(error_1.StatusCode.UNPROCESSABLE_ENTITY, `Body schema validation error`, error); | ||
return (0, error_1.httpError)(error_1.StatusCode.BAD_REQUEST, `Body schema validation error`, error); | ||
case 'query': | ||
return (0, error_1.httpError)(error_1.StatusCode.UNPROCESSABLE_ENTITY, `Parameters schema validation error`, error); | ||
return (0, error_1.httpError)(error_1.StatusCode.BAD_REQUEST, `Parameters schema validation error`, error); | ||
case 'headers': | ||
return (0, error_1.httpError)(error_1.StatusCode.UNPROCESSABLE_ENTITY, `Headers schema validation error`, error); | ||
return (0, error_1.httpError)(error_1.StatusCode.BAD_REQUEST, `Headers schema validation error`, error); | ||
} | ||
@@ -44,0 +44,0 @@ } |
@@ -20,3 +20,3 @@ "use strict"; | ||
if (missingFiles.length > 0) | ||
return (0, error_1.httpError)(error_1.StatusCode.UNPROCESSABLE_ENTITY, "You didn't send all required files", { | ||
return (0, error_1.httpError)(error_1.StatusCode.BAD_REQUEST, "You didn't send all required files", { | ||
missingFiles, | ||
@@ -23,0 +23,0 @@ }); |
@@ -10,3 +10,3 @@ "use strict"; | ||
endpoint: (0, core_1.handler)({ | ||
resolve: () => (0, error_1.httpError)(error_1.StatusCode.NOT_FOUND, 'Root not found'), | ||
resolve: () => (0, error_1.httpError)(error_1.StatusCode.NOT_FOUND, 'Route not found'), | ||
}), | ||
@@ -13,0 +13,0 @@ }, |
@@ -32,3 +32,5 @@ "use strict"; | ||
}); | ||
if (result.error) { | ||
if (!result) | ||
return res.writeHead(200, { 'Content-Type': 'application/json' }).end(JSON.stringify(`{}`)); | ||
if (result?.error) { | ||
config?.errorHandler?.({ error: result.error, path: path }); | ||
@@ -35,0 +37,0 @@ return res |
{ | ||
"name": "bridge", | ||
"version": "2.0.29", | ||
"version": "2.0.30", | ||
"description": "Bridge is a Typescript Node.js framework that provides an easy and scalable way to create REST APIs while generating the client code.", | ||
@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114530
1188