Skip to content

Commit

Permalink
chore(): message fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii-F-Braavos authored and avimak committed Mar 15, 2024
1 parent 0f7b5a8 commit 08c7f82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions repository/errors-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
},
{
"matcher": "/Class with hash ClassHash.+.is not declared/",
"message": "Class with required hash is not declared"
"message": "Can't deploy contract. ClassHash is not declared"
},
{
"matcher": "/Entry point EntryPointSelector\\(StarkFelt\\(\\\\\"0x[0-9a-zA-Z]+\\\\\"\\)\\) not found in contract/",
"message": "Entry point not found in contract"
"message": "The protocol's contract doesn't recognize this action"
},
{
"matcher": "/failure reason.*TransactionFeeError\\(MaxFeeTooLow/",
"message": "The specified max fee is too low"
"message": "Insufficient gas fee to complete the transaction"
}
]
}
20 changes: 9 additions & 11 deletions scripts/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,16 @@ const validateErrorMatchers = (errorMatchers, _messageBase) => {
}
}

(errorMatcher.extractors || []).forEach(
(extractor, extractorIdx) => {
try {
stringToRegExp(extractor.matcher);
} catch (e) {
errorsArray.push(
errorMessageBase +
`/extractors/${extractorIdx}/matcher contains invalid regExp`
);
}
errorMatcher.extractors?.forEach((extractor, extractorIdx) => {
try {
stringToRegExp(extractor.matcher);
} catch (e) {
errorsArray.push(
errorMessageBase +
`/extractors/${extractorIdx}/matcher contains invalid regExp`
);
}
);
});
});
});

Expand Down

0 comments on commit 08c7f82

Please sign in to comment.