File tree 2 files changed +1
-3
lines changed
main/java/com/datadog/appsec/ddwaf
test/groovy/com/datadog/appsec/ddwaf
2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ public void onDataAvailable(
446
446
if (!reqCtx .isWafContextClosed ()) {
447
447
log .error ("Error calling WAF" , e );
448
448
}
449
- incrementErrorCodeMetric (gwCtx , e .code );
449
+ incrementErrorCodeMetric (reqCtx , gwCtx , e .code );
450
450
return ;
451
451
} catch (AbstractWafException e ) {
452
452
incrementErrorCodeMetric (reqCtx , gwCtx , e .code );
Original file line number Diff line number Diff line change @@ -1786,7 +1786,6 @@ class WAFModuleSpecification extends DDSpecification {
1786
1786
1 * wafMetricCollector. wafInit(Waf . LIB_VERSION , _, true )
1787
1787
1 * ctx. getRaspMetrics()
1788
1788
1 * ctx. getRaspMetricsCounter()
1789
- (0 .. 1 ) * WafMetricCollector . get(). wafRequestError() // TODO: remove this line when WAFModule is removed
1790
1789
1 * wafMetricCollector. raspErrorCode(RuleType . SQL_INJECTION , wafErrorCode. code)
1791
1790
0 * _
1792
1791
@@ -1815,7 +1814,6 @@ class WAFModuleSpecification extends DDSpecification {
1815
1814
1 * wafContext. run(_, _, _) >> { throw createWafException(wafErrorCode) }
1816
1815
1 * wafMetricCollector. wafInit(Waf . LIB_VERSION , _, true )
1817
1816
2 * ctx. getWafMetrics()
1818
- (0 .. 1 ) * WafMetricCollector . get(). wafRequestError() // TODO: remove this line when WAFModule is removed
1819
1817
1 * wafMetricCollector. wafErrorCode(wafErrorCode. code)
1820
1818
0 * _
1821
1819
You can’t perform that action at this time.
0 commit comments