Skip to content

Commit

Permalink
Merge branch 'master' into task/add_more_cases
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega authored Sep 26, 2023
2 parents 596a1a8 + 41e53ad commit c8e968c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- Add: apply expandVar with JSON.parse to all fields of all actions (sms, smpp, email, post, update)
- Fix: check domain before access domain
- Fix: expandVar return a 'null' instead of null (#746)
- Fix: smtp and smpp logs (#738)
- Add: allow access entities using NGSIv2 API for non_signal rules (new setting nonSignalByAPI / PERSEO_CHECK_NON_SIGNAL_BY_API) (#549)
- Remove support for ngsv1 notifications (#714)
- Remove ngsiv1 support for updateAction (#714)
- Fix: check timer string in lower case in TimedRule checker

- Fix: check timer string in lower case in TimedRule checker
8 changes: 4 additions & 4 deletions lib/myutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function requestHelperAux(method, options, withMetrics, callback) {
}
}
options.headers = headers;
if (withMetrics && options.json && domain.context) {
if (withMetrics && options.json && domain && domain.context) {
try {
metrics.IncMetrics(
domain.context.srv,
Expand All @@ -160,7 +160,7 @@ function requestHelperAux(method, options, withMetrics, callback) {
}
request[method](options, function cbRequest2core(err, response, body) {
var bodySz = 0;
if (withMetrics && domain.context) {
if (withMetrics && domain && domain.context) {
if (body) {
if (typeof body === 'string') {
bodySz = Buffer.byteLength(body);
Expand All @@ -181,7 +181,7 @@ function requestHelperAux(method, options, withMetrics, callback) {
}
if (err) {
logErrorIf(err, util.format('error %s to %s', method, options.url));
if (withMetrics && domain.context) {
if (withMetrics && domain && domain.context) {
metrics.IncMetrics(domain.context.srv, domain.context.subsrv, metrics.outgoingTransactionsErrors);
}
return callback(err, null);
Expand All @@ -199,7 +199,7 @@ function requestHelperAux(method, options, withMetrics, callback) {
);
localError.httpCode = respObj.code < 500 && respObj.code >= 400 ? respObj.code : 500;
logErrorIf(localError, null, domain && domain.context);
if (withMetrics && domain.context) {
if (withMetrics && domain && domain.context) {
metrics.IncMetrics(domain.context.srv, domain.context.subsrv, metrics.outgoingTransactionsErrors);
}
return callback(localError, respObj);
Expand Down

0 comments on commit c8e968c

Please sign in to comment.