backtrace-service
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -162,6 +162,13 @@ "use strict"; | ||
const logger = logger_1.Logger.getLogger(); | ||
// Backtrace service ApiError (pending in CR) contains type statusCode that allows us | ||
// if we reach this part of code, the error middlewa needs to assume | ||
// the teams validation weren't handled on the route side - for example: | ||
// when exception were throwed by the 3rd party library when someone sends | ||
// invalid JSON object. In this situation we should return an error and mark | ||
// request as validated | ||
identityManager?.bypassProjectAccessCheck(res); | ||
// Backtrace service ApiError contains type statusCode that allows us | ||
// to determine what type of response we should return | ||
// in addition to that I recognize sometimes we retrieve status code from response.status | ||
// property. This is a popular pattern for axios communication - check comments and hooks. | ||
// in addition to that the error middleware can read a status code from response.status | ||
// property. This is a popular pattern for axios communication - check other services | ||
// to learn more how errors throwed by axios are beings handled by them. | ||
if (err.statusCode || (err.response && err.response.status)) { | ||
@@ -168,0 +175,0 @@ const status = err.statusCode || err.response.status; |
{ | ||
"name": "backtrace-service", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Common tools for Backtrace Node services", | ||
@@ -5,0 +5,0 @@ "author": "Backtrace", |
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
157809
2227