File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export const handler: PluginHandler = async (
107
107
responseData : response . data ,
108
108
requestContext : {
109
109
headers,
110
- timeout : 3000 ,
110
+ timeout : parameters . timeout || 3000 ,
111
111
} ,
112
112
} ;
113
113
} catch ( e : any ) {
@@ -124,7 +124,7 @@ export const handler: PluginHandler = async (
124
124
webhookUrl : parameters . webhookURL || 'No URL provided' ,
125
125
requestContext : {
126
126
headers : parameters . headers || { } ,
127
- timeout : 3000 ,
127
+ timeout : parameters . timeout || 3000 ,
128
128
} ,
129
129
// return response body if it's not a ok response and not a timeout error
130
130
...( responseData &&
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ export class HooksManager {
306
306
transformed : result . transformed || false ,
307
307
created_at : createdAt ,
308
308
log : result . log || null ,
309
- failOnError :
309
+ fail_on_error :
310
310
( check . parameters as Record < string , any > ) ?. failOnError || false ,
311
311
} ;
312
312
} catch ( err : any ) {
@@ -394,7 +394,7 @@ export class HooksManager {
394
394
hookResult = {
395
395
// if guardrail has error, make verdict false else do the normal check
396
396
verdict : checkResults . every (
397
- ( result ) => result . verdict || ( result . error && ! result . failOnError )
397
+ ( result ) => result . verdict || ( result . error && ! result . fail_on_error )
398
398
) ,
399
399
id : hook . id ,
400
400
transformed : checkResults . some ( ( result ) => result . transformed ) ,
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export interface GuardrailCheckResult {
80
80
} ;
81
81
} ;
82
82
log ?: any ;
83
- failOnError ?: boolean ;
83
+ fail_on_error ?: boolean ;
84
84
}
85
85
86
86
export interface GuardrailResult {
You can’t perform that action at this time.
0 commit comments