File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class InextricableResponseBodyError < StandardError
15
15
attr_reader :response_body_class
16
16
17
17
sig { params ( response_body_class : String ) . void }
18
- def initialize ( response_body_class : )
18
+ def initialize ( response_body_class )
19
19
@response_body_class = response_body_class
20
20
super ( "failed to extract response body: response_body_class=#{ response_body_class } " )
21
21
end
@@ -44,7 +44,7 @@ def initialize(stack_depth, max_stack_depth)
44
44
case ( inner_body = body . instance_variable_get ( :@body ) )
45
45
when Rack ::BodyProxy then extract_body_from_rack_body_proxy ( inner_body , stack_depth + 1 )
46
46
when Array then inner_body [ 0 ] || "null"
47
- else raise InextricableResponseBodyError . new ( inner_body . class . name )
47
+ else raise InextricableResponseBodyError , inner_body . class . name
48
48
end
49
49
end
50
50
@@ -73,7 +73,7 @@ def self.from(res)
73
73
rack_response : res ,
74
74
content_type : res . headers [ "Content-Type" ] || "unknown_content_type" ,
75
75
headers : res . headers . as_json ,
76
- payload : extract_payload ( res ) || { __false_body : :body_may_be_nil } ,
76
+ payload : extract_payload ( res ) || { __false_body : :body_may_be_nil } ,
77
77
status : res . status
78
78
)
79
79
end
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ def call(env)
41
41
logger . warn \
42
42
"[vigiles] conversation recorder error: " \
43
43
"error_message=#{ e . message } " \
44
- "error_class=#{ e . class } "
44
+ "error_class=#{ e . class } " \
45
+ "backtrace=#{ e . backtrace } "
45
46
ensure
46
47
# no matter what happens we shouldn't prevent the rack
47
48
# response from being returned. at this point, the only
Original file line number Diff line number Diff line change 7
7
module Vigiles
8
8
class Options < T ::Struct
9
9
const :capture_exception , T . proc . params ( a0 : StandardError ) . void
10
- const :logger , ::Logger
10
+ const :logger , T . any ( ::Logger , ActiveSupport :: BroadcastLogger )
11
11
12
12
sig { returns ( Options ) }
13
13
def self . make_default_options
You can’t perform that action at this time.
0 commit comments