File tree 1 file changed +10
-4
lines changed
keep/providers/linearb_provider
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,11 @@ def _notify(
98
98
if result .ok :
99
99
self .logger .info ("Deleted incident successfully" )
100
100
else :
101
- self .logger .warning (
102
- "Failed to delete incident" , extra = {** result .json ()}
103
- )
101
+ r = result .json ()
102
+ # don't override message
103
+ if "message" in r :
104
+ r ["message_from_linearb" ] = r .pop ("message" )
105
+ self .logger .warning ("Failed to delete incident" , extra = {** r })
104
106
raise Exception (f"Failed to notify linearB { result .text } " )
105
107
return result .text
106
108
@@ -228,9 +230,13 @@ def _notify(
228
230
"Notified LinearB successfully" , extra = {"payload" : payload }
229
231
)
230
232
else :
233
+ # don't override message
234
+ r = result .json ()
235
+ if "message" in r :
236
+ r ["message_from_linearb" ] = r .pop ("message" )
231
237
self .logger .warning (
232
238
"Failed to notify linearB" ,
233
- extra = {** result . json () , "payload" : payload },
239
+ extra = {** r , "payload" : payload },
234
240
)
235
241
raise Exception (f"Failed to notify linearB { result .text } " )
236
242
You can’t perform that action at this time.
0 commit comments