Skip to content

Commit

Permalink
set severity to high for failed txs
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Nov 17, 2024
1 parent 5b5fc8d commit 64eb1ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/processOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,14 @@ export const processOrders = async (
message = errorSnapshot(message, e.error);
span.setAttribute("errorDetails", message);
}
span.setAttribute("severity", ErrorSeverity.MEDIUM);
span.setAttribute("severity", ErrorSeverity.HIGH);
span.setStatus({ code: SpanStatusCode.ERROR, message });
span.setAttribute("unsuccessfulClear", true);
span.setAttribute("txSendFailed", true);
} else if (e.reason === ProcessPairHaltReason.TxReverted) {
// Tx reverted onchain, this can happen for example
// because of mev front running or false positive opportunities, etc
// set the severity to LOW
span.setAttribute("severity", ErrorSeverity.LOW);
span.setAttribute("severity", ErrorSeverity.HIGH);
span.setStatus({
code: SpanStatusCode.ERROR,
message: "transaction reverted onchain",
Expand All @@ -341,7 +340,7 @@ export const processOrders = async (
message = errorSnapshot(message, e.error);
span.setAttribute("errorDetails", message);
}
span.setAttribute("severity", ErrorSeverity.MEDIUM);
span.setAttribute("severity", ErrorSeverity.HIGH);
span.setStatus({ code: SpanStatusCode.ERROR, message });
span.setAttribute("unsuccessfulClear", true);
span.setAttribute("txMineFailed", true);
Expand Down

0 comments on commit 64eb1ef

Please sign in to comment.