Skip to content

Commit

Permalink
Merge pull request #247 from digi-serve/jh/sentryTest
Browse files Browse the repository at this point in the history
Temporary test to catch strange error condition
  • Loading branch information
Hiro-Nakamura authored Aug 29, 2024
2 parents 3f86f4d + 2555efc commit c32182b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ABObjectCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,21 @@ module.exports = class ABObjectCore extends ABMLClass {
whereCleanUp(curr) {
if (curr) {
if (curr.glue && curr.rules) {
// SENTRY Error AB-APPBUILDER-4H
// "curr.rules.forEach is not a function"
// curr.rules is supposed to be an array. If we are not
// getting that, then let's send an alert to figure out what
// is happening here:
if (!Array.isArray(curr.rules)) {
// what is this entry?
let err = new Error(
`ABObjectCore.whereCleanUP(): Sentry Error: AB-APPBUILDER-4H: current rule is not properly formed: ${JSON.stringify(
curr
)}`
);
this.AB.notify.developer(err, { curr });
}

// this is a logical Block (AND, OR)
// we need to filter the children
let newValue = { glue: curr.glue, rules: [] };
Expand Down

0 comments on commit c32182b

Please sign in to comment.