From 01d150ea862e2257423c04a82fea5996e78b53c9 Mon Sep 17 00:00:00 2001 From: Yury Lebedev Date: Fri, 29 Nov 2024 10:38:53 +0100 Subject: [PATCH] Remove fetch from AppSec::Response for getting status_code --- lib/datadog/appsec/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datadog/appsec/response.rb b/lib/datadog/appsec/response.rb index 7acccf3189..8d63fd8862 100644 --- a/lib/datadog/appsec/response.rb +++ b/lib/datadog/appsec/response.rb @@ -87,7 +87,7 @@ def block_response(env, options) body << content(content_type) Response.new( - status: options.fetch('status_code', 403).to_i, + status: options['status_code']&.to_i || 403, headers: { 'Content-Type' => content_type }, body: body, )