-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
when a http action is used that sends a request to populate certain variables, and the request times out, the bot currently returns Variable '<variable name>' has not been defined for any variables that do not get populated. an internal request was filed for the desire to provide a more meaningful message.
desired functionality:
- change default message (
<action_name> action timed outwas suggested) - per action customization (adding
timeout_messagefield) - silently fail if
timeout_messageis empty string
to note:
"not defined" message does not exclusively happen when requests time out, so perhaps the default message should be something else, or maybe there is a need to define messages for other scenarios, such as when an API returns any non-200 messages.
example rules file:
name: test
active: true
respond: test
actions:
- name: test rule
type: GET
url: http://somehost.example.com/endpoint
expose_json_fields:
output: |-
{{if and (ge ${_raw_http_status} 200) (lt ${_raw_http_status} 300) }}
{{.message}}
{{else}}
request failed with http status code `${_raw_http_status}`
{{end}}
timeout: 1
format_output: "${output}"
direct_message_only: false
help_text: "Sample rules to reproduce Variable `output` has not been defined issue."
include_in_help: trueMetadata
Metadata
Assignees
Labels
No labels